Bug#575868: libc6: postinst check for services that need be restarted assumes all initscripts support the 'status' action
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: Bug#575868: libc6: postinst check for services that need be restarted assumes all initscripts support the 'status' action
- From: Nikolaus Schulz <microschulz@web.de>
- Date: Tue, 30 Mar 2010 01:16:55 +0200
- Message-id: <20100329231655.4259.86744.reportbug@luigi.zusammrottung.local>
- Reply-to: Nikolaus Schulz <microschulz@web.de>, 575868@bugs.debian.org
Package: libc6
Version: 2.10.2-6
Severity: normal
Hi,
the check in the postinst for services that need be restarted is buggy:
,----[ libc6.postinst ]
| for service in $check; do
| if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
| invoke-rc.d ${service} status 2>/dev/null || status=$?
| if [ "$status" = "0" ] || [ "$status" = "1" ] ; then
| services="$service $services"
| elif [ "$status" = "100" ] ; then
| echo "WARNING: init script for $service not found."
| fi
| else
`----
The problem is, it is not required for initscripts to provide the 'status'
command (although supporting it is an unofficial release goal[1]).
For example, when I upgraded from lenny to current squeeze, the following
packages with initscripts checked in the postinst didn't support the 'status'
command:
atd cron lpd openbsd-inetd rsync
Of these, atd, lpd and rsync returned the exit code "1", which is acceptable;
cron and openbsd-inetd however returned the exit code "2", causing them not to
be restarted.
(Actually, NO services where restarted anyway due to bug #569701 (non-breaking
space in libc6's postinst).)
Nikolaus
[1] http://wiki.debian.org/LSBInitScripts/StatusSupport
-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.32-3-686 (SMP w/1 CPU core)
Locale: LANG=de_DE.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages libc6 depends on:
ii libc-bin 2.10.2-6 Embedded GNU C Library: Binaries
ii libgcc1 1:4.4.2-9 GCC support library
Versions of packages libc6 recommends:
ii libc6-i686 2.10.2-6 GNU C Library: Shared libraries [i
Versions of packages libc6 suggests:
ii debconf [debconf-2.0] 1.5.28 Debian configuration management sy
ii glibc-doc 2.10.2-6 Embedded GNU C Library: Documentat
ii locales 2.10.2-6 Embedded GNU C Library: National L
-- debconf information:
glibc/upgrade: true
glibc/disable-screensaver:
glibc/restart-failed:
glibc/restart-services:
Reply to: