[Fedora-packaging] initscripts in spec file scriptlets
Chuck Anderson
cra at WPI.EDU
Thu Jun 11 22:14:43 UTC 2009
http://fedoraproject.org/wiki/Packaging/SysVInitScript
has an example of how to write %post/%preun scriptlets that install
init scripts. The problem is, the %post one will overwrite the
/etc/rc?.d/[KS] symlinks upon every package upgrade:
%post
# This adds the proper /etc/rc*.d links for the script
/sbin/chkconfig --add <script>
shouldn't this rather be:
%post
# This adds the proper /etc/rc*.d links for the script
# only during the initial package install, not upgrades
if [ $1 -eq 1 ]; then
/sbin/chkconfig --add <script>
fi
so it only does the --add on initial installs, not upgrades? If you
re-do the chkconfig --add on upgrades, won't that overwrite the
runlevel on/off settings that the sysadmin may have customized?
More information about the Fedora-packaging
mailing list