Package: chkconfig
Version: 11.0-79.1-1
Severity: important
Tags: patch
This is my first Debian bug report.
The `service --status-all` command in chkconfig is dangerous on Debian,
as it blindly executes all scripts in /etc/init.d/ with the option
"status", but there is no requirement that initscripts interpret their
arguments. rcS and some others do not, so after `service --status-all`
rcS will leave the system in an odd state.
The patch makes `service --status-all` only execute files containing
the string "status)", which is what most initscripts use to decode
commands and doesn't often occur elsewhere. I think the patch is
suitable for upstream, but not as necessary on Red Hat style distros.
I also have a few more enhancements to `service --status-all` if you
want them.
Additionally, I think that the packaging guidelines for initscripts
should be changed to require that all packaged initscripts interpret
their arguments and exit with an error message and non-zero status if
they get a bad argument. Let me know if I should file a bug for this.
-- System Information:
Debian Release: 5.0.3
APT prefers stable
APT policy: (500, 'stable')
Architecture: powerpc (ppc)
Kernel: Linux 2.6.26-2-powerpc
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages chkconfig depends on:
ii perl 5.10.0-19lenny2 Larry Wall's Practical Extraction
Versions of packages chkconfig recommends:
ii insserv 1.12.0-4 boot sequence organizer using LSB
chkconfig suggests no packages.
-- no debconf information
--- /sbin/service.old 2008-06-20 05:22:22.000000000 -0400
+++ /sbin/service 2009-11-04 18:44:07.000000000 -0500
@@ -91,6 +91,7 @@
powerfail|rx|Makefile|README) continue ;;
skeleton|*.d) continue ;;
esac
+ grep -qI 'status)' $rc || continue
exec_rc $rc status
done
exit 0