我有一个创建RPM工件的pom文件,RPM会将/tmp/some_script.sh
安装到/etc/init.d/some_script
。
确实可以做到这一点,但它也会在安装/etc/init.d
之前尝试安装/etc/init.d/some_script
。换句话说,如果我跑:
rpm -qlp my_rpm.rpm
我明白了:
/etc/init.d
/etc/init.d/some_script
.....
如何强制它不安装/etc/init.d
?
以下是相关配置:
<mapping>
<directory>/etc/init.d</directory>
<username>root</username>
<groupname>root</groupname>
<sources>
<source>
<location>/tmp/some_script.sh</location>
<destination>some_script</destination>
</source>
</sources>
</mapping>
答案 0 :(得分:13)
<mapping>
<directory>/etc/init.d</directory>
<!-- Set this to false -->
<directoryIncluded>false</directoryIncluded>
<username>root</username>
<groupname>root</groupname>
<sources>
<source>
<location>/tmp/some_script.sh</location>
<destination>some_script</destination>
</source>
</sources>
</mapping>