1
我使用maven rpm插件(2.1-alpha-1)创建了一个rpm文件。我需要在rpm文件的%post中执行两个命令。生成的spec文件和命令“rpm -q --scripts filename”显示了这两个命令。 这里是“的输出转速-q --scripts文件名|少”rpm post安装命令不执行
postinstall scriplet (using /bin/sh):
ln -s /etc/init.d/source /etc/init.d/target
ln -s /var/app/source1 /var/app/target1
这里是指令如何在转速插件部
<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.-->
但是只有第二个被执行给定的。我在这里失踪的任何东西?任何解决方法来完成这项工作?提前致谢。
嗯......我们确定第二个ln没有执行吗?还是无法创建链接? – thekbb
第二个ln得到执行并创建链接,但第一个不是 – rpmguy
顺便说一句,你的例子是不正确的:'ln'参数是错误的,因为第一个参数应该指定目标,而不是源文件。 –