tags 521392 + patch
tags 248436 - patch
thanks
[Tim Cutts]
> Consider the situation where the local admin currently has disabled
> the existing copy of am-utils by using update-rc.d. If the package
> is upgraded, it's my view that the upgrade should not automatically
> re-enable the init script - that's not my decision to make. That's
> why it only runs the update-rc.d on an install, and not on an
> upgrade.
Your argument is flawed. If the admin have correctly disabled the
existing copy of am-utils, the symlinks in /etc/rc?.d/ have been
changed from S* to K*, and update-rc.d will not do anything during
upgrades. There is no need to add extra code to only run update-rc.d
during first time installation.
If the admin on the other hand have incorrectly removed all symlinks
for am-utils, the system is in an undefined state and the admin do not
get what she expect, but instead the symlinks will be reinstalled
during upgrades. Packages should not work around bugs in the heads of
admins, who breaking the boot system by "disabling" services by
removing the symlinks instead of changing start symlinks to stop
symlinks. To quote from the update-rc.d(8) manual page:
A common system administration error is to delete the links with the
thought that this will "disable" the service, i.e., that this will
prevent the service from being started. However, if all links have
been deleted then the next time the package is upgraded, the
package's postinst script will run update-rc.d again and this will
reinstall links at their factory default locations. The correct way
to disable services is to configure the service as stopped in all
runlevels in which it is started by default. In the System V init
system this means renaming the service's symbolic links from S to K.
This patch solve the issue.
diff -ur ../am-utils-6.1.5/debian/am-utils.postinst
../am-utils-6.1.5-pere/debian/am-utils.postinst
--- ../am-utils-6.1.5/debian/am-utils.postinst 2009-09-14 10:10:50.000000000
+0200
+++ ../am-utils-6.1.5-pere/debian/am-utils.postinst 2009-09-14
10:16:41.000000000 +0200
@@ -107,10 +107,6 @@
rm -f $tmpfile
fi
-if [ "$1" = "install" ]; then
- update-rc.d am-utils defaults 35 >/dev/null
-fi
-
#DEBHELPER#
### Begin autodetect stuck amds...
diff -ur ../am-utils-6.1.5/debian/rules ../am-utils-6.1.5-pere/debian/rules
--- ../am-utils-6.1.5/debian/rules 2009-09-14 10:10:50.000000000 +0200
+++ ../am-utils-6.1.5-pere/debian/rules 2009-09-14 10:16:11.000000000 +0200
@@ -174,7 +174,7 @@
gzip -v9 debian/am-utils/usr/share/doc/am-utils/kernel-patches/*
install -d debian/am-utils/usr/share/am-utils
cp debian/a_net debian/am-utils/usr/share/am-utils/amd.net
- dh_installinit -n
+ dh_installinit
dh_installchangelogs ChangeLog
dh_strip
dh_link
Happy hacking,
--
Petter Reinholdtsen
One of the sysvinit maintainers
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]