开发者

rpm post install commands not executing

I created a rpm file using the maven rpm plugin(2.1-alpha-1). I need to execute two commands in the %post of the rpm file. The generated spec file and the command "rpm -q --scripts filename" show both the commands. Here is the output of "rpm -q --scripts filename | less "

postinstall scriplet (using /bin/sh):
ln -s /etc/init.d/source /etc/init.d/target
ln -s /var/app/source1 /var/app/target1

Here is how the commands are given in the rpm plugin section

    <postinstall>ln -s /etc/init.d/source /etc/init.d/target 
    ln -s /var/app/source1 /var/app/target1</postinstall>
    <!-- I have tried to separate the two commands with ";" 
too but that does not work either.-->开发者_StackOverflow社区

However only the second one gets executed. Anything I am missing here?? Any workarounds to get this done? Thanks in advance.


Maybe it's not a packaging problem. Instead SELinux might be enabled on you target system, and it might be blocking the creation of the link, so check /var/log/audit/audit.log to see if any deny messages are being generated.

You might also want to manually try the 'ln -s /etc/init.d/source /etc/init.d/target' as root on the target system. If SELinux is biting you, this would also fail.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜