Bug#262625: invoke-rc.d should be used
Ognyan Kulev
Ognyan Kulev <ogi@fmi.uni-sofia.bg>, 262625@bugs.debian.org
Sun, 01 Aug 2004 10:20:51 +0300
Package: gdm
Version: 2.4.4.7-3
Severity: serious
The following code is used in gdm.prerm:
if [ "$1" = "remove" ]; then
nostop=
for hostname in "" "localhost" "$(hostname)" "$(hostname -f)"; do
if echo $DISPLAY | grep -q "^$hostname:0.*"; then
nostop=yes
fi
done
if [ -z $nostop ]; then
/etc/init.d/gdm stop
fi
fi
Debian Policy explicitly states that invoke-rc.d should be used:
http://www.debian.org/doc/debian-policy/ch-opersys.html#s9.3.3
Many scripts look like:
# Automatically added by dh_installinit
if [ -x "/etc/init.d/apache2" ]; then
update-rc.d apache2 defaults 91 >/dev/null
if [ -x /usr/sbin/invoke-rc.d ]; then
invoke-rc.d apache2 start
else
/etc/init.d/apache2 start
fi
fi
Regards,
ogi