9.3.3 (init script installation): disable init scripts on removal of package
Hello all,
I think it would be very beneficial to either recommend or explicitly permit packages to disable their init scripts when they are uninstalled.
There are a variety of benefits to this behaviour:
* it is less hacky, because the init script does not need a "test -x /usr/sbin/daemon || exit 0" line.
* it prevents boot locks (I will explain later)
* socket activated init systems with configs in /etc will not create the sockets if the script/job is disabled (currently they do create and listen on the socket even if the daemon is removed, but not purged)
More about boot locks: I have seen this a ton with Upstart, but it could happen with regular sysvinit too. One example is the following two (abbreviated) scripts:
### BEGIN INIT INFO
# Provides: foo
### END INIT INFO
### BEGIN INIT INFO
# Provides: foo-mysql
# Required-Start: mysql
# Required-Stop: mysql
# X-Start-Before: foo
# X-Stop-After: foo
### END INIT INFO
foo should only depend on mysql being started if the foo-mysql package is installed, but it _always_ waits (unless foo-mysql has been purged) because foo-mysql is not disabled when the foo-mysql package is removed. This can cause foo to _never start_ if mysql has been purged, but foo-mysql has not.
This is just the tip of the iceberg in my experience, and I would be very pleased if Debian adopted the policy of disabling a service when the package is uninstalled.
Thank you for your time,
--
Cameron Norman
Reply to: