[Pkg-sysvinit-devel] Bug#362128: Bug#354163: Getting the machine to power down?

Andreas Tille tillea at rki.de
Tue Sep 12 08:11:54 UTC 2006


On Tue, 12 Sep 2006, Petter Reinholdtsen wrote:

> OK.  I am still fumbling in the dark.  Can you provide the output of
> for a working and a broken system?

I think I will use the very same system.

1. The working version:
-----------------------

$ dpkg --status initscripts | grep Version
Version: 2.86.ds1-10

>  ls /etc/rcS.d /etc/rc2.d /etc/rc6.d

See attachment ls_etc-v10.

> Also, it would be useful to know the content of your /etc/fstab

# <file system> <mount point>   <type>  <options>               <dump>  <pass>
/dev/hda1       /               ext3    errors=remount-ro       0       1
/dev/hda2       none            swap    sw                      0       0
proc            /proc           proc    defaults                0       0
none            /proc/bus/usb   usbfs   defaults                0       0
/dev/hda3       /usr    ext3    defaults                        0       2
/dev/hda5       /var    ext3    defaults                        0       2

wr-linux02:/home          /home  nfs  defaults
wr-linux02:/usr/local     /usr/local  nfs  defaults

/dev/fd0   /m/a       auto      defaults,user,exec,noauto               0       0
/dev/cdrom /m/cdrom   auto      ro,user,exec,noauto             0       2
/dev/cdwr  /m/cdwr    auto      ro,user,exec,noauto             0       2


> and
> /etc/default/rcS.

#
#       Defaults for the boot scripts in /etc/rcS.d
#

# Time files in /tmp are kept in days.
TMPTIME=0
# Set to yes if you want sulogin to be spawned on bootup
SULOGIN=no
# Set to no if you want to be able to login over telnet/rlogin
# before system startup is complete (as soon as inetd is started)
DELAYLOGIN=yes
# Set UTC=yes if your system clock is set to UTC (GMT), and UTC=no if not.
UTC=yes
# Set VERBOSE to "no" if you would like a more quiet bootup.
VERBOSE=yes
# Set EDITMOTD to "no" if you don't want /etc/motd to be editted automatically
EDITMOTD=yes
# Set FSCKFIX to "yes" if you want to add "-y" to the fsck at startup.
FSCKFIX=no

(I never changed this file manually.)


2. The non-working version:
---------------------------

$ dpkg --status initscripts | grep Version
Version: 2.86.ds1-11

>  ls /etc/rcS.d /etc/rc2.d /etc/rc6.d

Hmmm, it shows no changces to attachment ls_etc-v10 so I do not send two
identical files.  I think I have a better idea: I copied the whole /etc
directory from "the working version" to etc_v10 and the version that does
not work any more to etc_v11 and did a

    diff -ubrN etc_v10 etc_v11

Hope this might give some hints (see attachment).

> Can you try to do 'shutdown -h now' while in a console (and not from
> X), and report the last 8 lines printed on the screen before it hangs.

Well, doing some grunt work stupid screen typing for you ;-))


Saving the system clock..
Hardware Clock updated to Tue Sep 12 ... bla
Stopping Squid HTTP proxy: squid.
Stopping NFS common utilities: statd.
Stopping deferred execution scheduler: atd.
Stopping kernel log daemon: klogd.
Stopping system log daemon: syslogd.
Stopping Device file system management daemon: No /sbin/devfsd found running; none killed.
devsfd.
Sending all processed the TERM signal...done.
Sending all processed the KILL signal...done.
Saving random seed...done.
Usage: grep [OPTION] ... PATTERN [FILE]                 <<<---- Hmmm ???
Try `grep --help' for more information.
Shutdown: hda
System halted.
Unmounting remote and non-toplevel virtual filesystems...


Remark 1: Every difference in the strings that might occure here was not
           caused by patches I did to my system but because I'm unable to
           copy my screen without errors. ;-)

Remark 2: The system was bootet using 2.86.ds1-10 and shutdown after
           installing 2.86.ds1-11.  The behaviour remains the same if
           bootet with 2.86.ds1-11.

> If fsck is needed on ever boot, that indicates that the final remount
> of the root file system never occured, and thus a shutdown order bug.

This is right according to all my knowledge. What confuses me is that
    Shutdown: hda
seemed to have done successfully according to the screen dump which
is really.  As you might have read I have reported this on debian-devel

    http://lists.debian.org/debian-devel/2006/03/msg00240.html  and
    http://lists.debian.org/debian-devel/2006/03/msg01108.html

for a different machine.

The strange thing is the brocken "grep" call but in the diff I attached
I do not find a changed line that contains grep.

I just have reinstalled 2.86.ds1-10 and when I do the `shutdown -h now'
the end shows some more text and no broken grep call - if you think it
makes sense to get these lines I'm willing to write down these as well
but have no good idea how to copy the screen once the box is switched
off.

Good luck

        Andreas.
-- 
http://fam-tille.de
-------------- next part --------------
/etc/rc2.d:
K08vmware
README
S10sysklogd
S11klogd
S18portmap
S19mysql-ndb-mgm
S20dbus-1
S20exim
S20inetd
S20intel-rng-tools
S20ipx
S20lpd
S20mysql
S20nfs-kernel-server
S20nvidia-glx
S20postgresql
S20postgresql-7.4
S20rsync
S20samba
S20sqlrelay
S20ssh
S20xdebconfigurator
S20zope
S20zope2.7
S21fam
S21mysql-ndb
S21nfs-common
S30squid
S30squid3
S50wu-ftpd
S89atd
S89cron
S90vmware
S91apache
S99fetchmail
S99gdm
S99rmnologin
S99stop-bootlogd
S99xdm

/etc/rc6.d:
K01gdm
K01xdm
K08vmware
K11cron
K15fetchmail
K19mysql-ndb-mgm
K19samba
K20apache
K20dbus-1
K20exim
K20inetd
K20intel-rng-tools
K20ipx
K20lpd
K20mysql
K20nvidia-glx
K20postgresql
K20postgresql-7.4
K20rsync
K20sqlrelay
K20ssh
K20xdebconfigurator
K20zope
K20zope2.7
K21fam
K21mysql-ndb
K25hwclock.sh
K30squid
K30squid3
K50wu-ftpd
K75hdparm
K79nfs-common
K80nfs-kernel-server
K89atd
K89klogd
K90sysklogd
README
S19devfsd
S20sendsigs
S30urandom
S31umountnfs.sh
S32portmap
S35networking
S40umountfs
S60umountroot
S90reboot

/etc/rcS.d:
README
S01devfsd
S01glibc.sh
S02mountkernfs.sh
S03udev
S04mountdevsubfs.sh
S05bootlogd
S05keymap.sh
S07hdparm
S10checkroot.sh
S15isapnp
S18hwclockfirst.sh
S18ifupdown-clean
S20module-init-tools
S20modutils
S22hwclock.sh
S25libdevmapper1.02
S30checkfs.sh
S30procps.sh
S35mountall.sh
S36mountall-bootclean.sh
S36mtab.sh
S36udev-mtab
S39ifupdown
S40hostname.sh
S40networking
S43portmap
S45mountnfs.sh
S46mountnfs-bootclean.sh
S48console-screen.sh
S51ntpdate
S55bootmisc.sh
S55urandom
S70screen-cleanup
S70x11-common
S71xserver-xorg
S75sudo
S99stop-bootlogd-single
-------------- next part --------------
diff -ubrN etc_v10/init.d/bootlogd etc_v11/init.d/bootlogd
--- etc_v10/init.d/bootlogd	2006-01-12 12:13:32.000000000 +0100
+++ etc_v11/init.d/bootlogd	2006-01-17 12:29:33.000000000 +0100
@@ -10,7 +10,7 @@
 #                    which logs boot messages.
 ### END INIT INFO
 
-PATH=/sbin:/bin  # No remote fs at start
+PATH=/sbin:/bin
 DAEMON=/sbin/bootlogd
 NAME=bootlogd
 DESC="boot logger"
@@ -43,6 +43,7 @@
 
 case "$ACTION" in
   start)
+  	# PATH is set above
 	log_daemon_msg "Starting $DESC" "$NAME"
 	if [ -d /proc/1/. ]
 	then
diff -ubrN etc_v10/init.d/bootmisc.sh etc_v11/init.d/bootmisc.sh
--- etc_v10/init.d/bootmisc.sh	2006-01-10 13:14:48.000000000 +0100
+++ etc_v11/init.d/bootmisc.sh	2006-01-22 20:50:11.000000000 +0100
@@ -9,6 +9,7 @@
 # Description:
 ### END INIT INFO
 
+PATH=/usr/sbin:/usr/bin:/sbin:/bin
 [ "$DELAYLOGIN" ] || DELAYLOGIN=yes
 . /lib/init/vars.sh
 
diff -ubrN etc_v10/init.d/checkfs.sh etc_v11/init.d/checkfs.sh
--- etc_v10/init.d/checkfs.sh	2006-01-12 13:55:40.000000000 +0100
+++ etc_v11/init.d/checkfs.sh	2006-01-17 11:42:07.000000000 +0100
@@ -10,7 +10,7 @@
 # Short-Description: Check all filesystems.
 ### END INIT INFO
 
-PATH=/bin:/sbin
+PATH=/sbin:/bin
 FSCK_LOGFILE=/var/log/fsck/checkfs
 [ "$FSCKFIX" ] || FSCKFIX=no
 . /lib/init/vars.sh
diff -ubrN etc_v10/init.d/checkroot.sh etc_v11/init.d/checkroot.sh
--- etc_v10/init.d/checkroot.sh	2006-01-12 13:55:40.000000000 +0100
+++ etc_v11/init.d/checkroot.sh	2006-01-17 19:41:58.000000000 +0100
@@ -10,7 +10,7 @@
 # Short-Description: Check to root file system.
 ### END INIT INFO
 
-PATH=/lib/init:/bin:/sbin
+PATH=/lib/init:/sbin:/bin
 FSCK_LOGFILE=/var/log/fsck/checkroot
 [ "$FSCKFIX" ] || FSCKFIX=no
 [ "$SULOGIN" ] || SULOGIN=no
@@ -31,20 +31,6 @@
 	MACHINE="$(uname -m)"
 
 	#
-	# Ensure that bdflush (update) is running before any major I/O is
-	# performed (the following fsck is a good example of such activity :).
-	# Only needed for kernels < 2.4.
-	#
-	if [ -x /sbin/update ] && [ "$KERNEL" = Linux ]
-	then
-		case "$RELEASE" in
-			0.*|1.*|2.[0123].*)
-				/sbin/update
-			;;
-		esac
-	fi
-
-	#
 	# Read /etc/fstab, looking for:
 	# 1) The root filesystem, resolving LABEL=*|UUID=* entries to the
 	# 	device node,
@@ -112,21 +98,21 @@
 	# Activate the swap device(s) in /etc/fstab. This needs to be done
 	# before fsck, since fsck can be quite memory-hungry.
 	#
-	doswap=no
+	ENABLE_SWAP=no
 	case "${KERNEL}:${RELEASE}" in
 	  Linux:2.[0123].*)
 		if [ "$swap_on_md" = yes ] && grep -qs resync /proc/mdstat
 		then
 			[ "$VERBOSE" = no ] || log_warning_msg "Not activating swap because RAID array is resyncing."
 		else
-			doswap=yes
+			ENABLE_SWAP=yes
 		fi
 		;;
 	  *)
-		doswap=yes
+		ENABLE_SWAP=yes
 		;;
 	esac
-	if [ "$doswap" = yes ]
+	if [ "$ENABLE_SWAP" = yes ]
 	then
 		if [ "$VERBOSE" = no ]
 		then
@@ -135,7 +121,7 @@
 			log_action_end_msg $?
 		else
 			log_action_msg "Will now activate swap"
-			swapon -a
+			swapon -a -v
 			ES=$?
 			if [ "$ES" = 0 ]
 			then
diff -ubrN etc_v10/init.d/halt etc_v11/init.d/halt
--- etc_v10/init.d/halt	2006-01-12 12:13:50.000000000 +0100
+++ etc_v11/init.d/halt	2006-01-22 20:50:11.000000000 +0100
@@ -11,7 +11,7 @@
 # Description:
 ### END INIT INFO
 
-PATH=/sbin:/bin:/usr/sbin:/usr/bin
+PATH=/usr/sbin:/usr/bin:/sbin:/bin
 [ -f /etc/default/halt ] && . /etc/default/halt
 
 . /lib/lsb/init-functions
diff -ubrN etc_v10/init.d/hostname.sh etc_v11/init.d/hostname.sh
--- etc_v10/init.d/hostname.sh	2005-12-01 17:56:21.000000000 +0100
+++ etc_v11/init.d/hostname.sh	2006-01-17 11:42:07.000000000 +0100
@@ -9,6 +9,8 @@
 # Description:
 ### END INIT INFO
 
+PATH=/sbin:/bin
+
 . /lib/lsb/init-functions
 
 do_start () {
diff -ubrN etc_v10/init.d/killprocs etc_v11/init.d/killprocs
--- etc_v10/init.d/killprocs	2005-12-01 17:56:21.000000000 +0100
+++ etc_v11/init.d/killprocs	2006-01-22 20:50:11.000000000 +0100
@@ -8,7 +8,7 @@
 # Short-Description: executed by init(8) upon entering runlevel 1 (single).
 ### END INIT INFO
 
-PATH="/sbin:/bin:/usr/sbin:/usr/bin"
+PATH=/usr/sbin:/usr/bin:/sbin:/bin
 
 . /lib/lsb/init-functions
 
diff -ubrN etc_v10/init.d/mountall.sh etc_v11/init.d/mountall.sh
--- etc_v10/init.d/mountall.sh	2006-01-12 12:07:57.000000000 +0100
+++ etc_v11/init.d/mountall.sh	2006-01-17 19:30:42.000000000 +0100
@@ -11,6 +11,7 @@
 # Description:
 ### END INIT INFO
 
+PATH=/sbin:/bin
 [ "$TMPTIME" ] || TMPTIME=0
 . /lib/init/vars.sh
 
@@ -79,10 +80,15 @@
 	# Execute swapon command again, in case we want to swap to
 	# a file on a now mounted filesystem.
 	#
-	[ "$VERBOSE" = no ] || log_action_begin_msg "Activating swapfile swap"
-	swapon -a -e 2>/dev/null  # Stifle "Device or resource busy"
+	if [ "$VERBOSE" = no ]
+	then
+		swapon -a -e 2>/dev/null || :    # Stifle "Device or resource busy"
+	else
+		log_action_begin_msg "Activating swapfile swap"
+		swapon -a -e -v || :
 	# Ignore 255 status
-	[ "$VERBOSE" = no ] || log_action_end_msg 0
+		log_action_end_msg 0
+	fi
 }
 
 case "$1" in
diff -ubrN etc_v10/init.d/mountdevsubfs.sh etc_v11/init.d/mountdevsubfs.sh
--- etc_v10/init.d/mountdevsubfs.sh	2006-01-12 19:26:32.000000000 +0100
+++ etc_v11/init.d/mountdevsubfs.sh	2006-01-17 12:35:19.000000000 +0100
@@ -9,11 +9,12 @@
 # Description:       Mount the virtual filesystems the kernel provides
 #                    that ordinarily live under the /dev filesystem.
 ### END INIT INFO
+#
+# This script gets called multiple times during boot and is also
+# called in initscripts postinst
+#
 
-# Script needs to be robust and continue when parts fail,
-# so we're NOT setting the "-e" option.
-
-PATH=/lib/init:/bin:/sbin
+PATH=/lib/init:/sbin:/bin
 TTYGRP=5
 TTYMODE=620
 [ -f /etc/default/devpts ] && . /etc/default/devpts
diff -ubrN etc_v10/init.d/mountkernfs.sh etc_v11/init.d/mountkernfs.sh
--- etc_v10/init.d/mountkernfs.sh	2006-01-11 19:37:49.000000000 +0100
+++ etc_v11/init.d/mountkernfs.sh	2006-01-17 12:35:19.000000000 +0100
@@ -9,11 +9,12 @@
 # Description:       Mount initial set of virtual filesystems the kernel
 #                    provides and that are required by everything.
 ### END INIT INFO
+#
+# This script gets called multiple times during boot and is also
+# called in initscripts postinst
+#
 
-# Script needs to be robust and continue when parts fail,
-# so we're NOT setting the "-e" option.
-
-PATH=/lib/init:/bin:/sbin
+PATH=/lib/init:/sbin:/bin
 
 . /lib/lsb/init-functions
 . /lib/init/mount-functions.sh
diff -ubrN etc_v10/init.d/mountnfs.sh etc_v11/init.d/mountnfs.sh
--- etc_v10/init.d/mountnfs.sh	2006-01-12 11:57:11.000000000 +0100
+++ etc_v11/init.d/mountnfs.sh	2006-01-17 11:42:07.000000000 +0100
@@ -15,6 +15,7 @@
 #                    this script is getting increasingly inaccurate.
 ### END INIT INFO
 
+PATH=/sbin:/bin
 [ "TMPTIME" ] || TMPTIME=0
 . /lib/init/vars.sh
 
diff -ubrN etc_v10/init.d/mountvirtfs etc_v11/init.d/mountvirtfs
--- etc_v10/init.d/mountvirtfs	2006-01-12 01:25:30.000000000 +0100
+++ etc_v11/init.d/mountvirtfs	2006-01-17 11:03:29.000000000 +0100
@@ -2,10 +2,10 @@
 #
 # mountvirtfs
 #
-# Script provided for backward-compatibility
+# Obsolete, but still provided for backward-compatibility
 #
 # Do not run this script directly in runlevel S. 
-# Run mountkernfs.sh and mountdevsubfs.sh instead
+# Run mountkernfs.sh and mountdevsubfs.sh instead.
 #
 
 case "$1" in
diff -ubrN etc_v10/init.d/reboot etc_v11/init.d/reboot
--- etc_v10/init.d/reboot	2006-01-12 13:46:41.000000000 +0100
+++ etc_v11/init.d/reboot	2006-01-22 20:50:11.000000000 +0100
@@ -10,7 +10,7 @@
 # Description:
 ### END INIT INFO
 
-PATH=/sbin:/bin:/usr/sbin:/usr/bin
+PATH=/usr/sbin:/usr/bin:/sbin:/bin
 
 . /lib/lsb/init-functions
 
diff -ubrN etc_v10/init.d/sendsigs etc_v11/init.d/sendsigs
--- etc_v10/init.d/sendsigs	2006-01-12 12:13:50.000000000 +0100
+++ etc_v11/init.d/sendsigs	2006-01-22 20:50:11.000000000 +0100
@@ -9,7 +9,7 @@
 # Description: 
 ### END INIT INFO
 
-PATH=/sbin:/bin:/usr/sbin:/usr/bin
+PATH=/usr/sbin:/usr/bin:/sbin:/bin
 
 . /lib/lsb/init-functions
 
diff -ubrN etc_v10/init.d/single etc_v11/init.d/single
--- etc_v10/init.d/single	2005-11-25 09:39:44.000000000 +0100
+++ etc_v11/init.d/single	2006-01-17 11:42:07.000000000 +0100
@@ -8,7 +8,7 @@
 # Short-Description: executed by init(8) upon entering runlevel 1 (single).
 ### END INIT INFO
 
-PATH="/sbin:/bin"
+PATH=/sbin:/bin
 
 . /lib/lsb/init-functions
 
diff -ubrN etc_v10/init.d/skeleton etc_v11/init.d/skeleton
--- etc_v10/init.d/skeleton	2006-01-12 12:13:50.000000000 +0100
+++ etc_v11/init.d/skeleton	2006-01-22 20:50:11.000000000 +0100
@@ -18,7 +18,7 @@
 # Do NOT "set -e"
 
 # PATH should only include /usr/* if it runs after the mountnfs.sh script
-PATH=/sbin:/bin:/usr/sbin:/usr/bin
+PATH=/usr/sbin:/usr/bin:/sbin:/bin
 DESC="Description of the service"
 NAME=daemonexecutablename
 DAEMON=/usr/sbin/$NAME
diff -ubrN etc_v10/init.d/stop-bootlogd-single etc_v11/init.d/stop-bootlogd-single
--- etc_v10/init.d/stop-bootlogd-single	2006-01-12 12:13:50.000000000 +0100
+++ etc_v11/init.d/stop-bootlogd-single	2006-01-22 20:50:11.000000000 +0100
@@ -9,6 +9,7 @@
 # Description:       See the bootlogd script
 ### END INIT INFO
 
+PATH=/usr/sbin:/usr/bin:/sbin:/bin
 NAME=stop-bootlogd-single
 DAEMON=/sbin/bootlogd
 
diff -ubrN etc_v10/init.d/umountfs etc_v11/init.d/umountfs
--- etc_v10/init.d/umountfs	2006-01-12 12:13:50.000000000 +0100
+++ etc_v11/init.d/umountfs	2006-01-22 20:50:11.000000000 +0100
@@ -9,7 +9,7 @@
 # Description:
 ### END INIT INFO
 
-PATH=/sbin:/bin:/usr/sbin:/usr/bin
+PATH=/usr/sbin:/usr/bin:/sbin:/bin
 . /lib/init/vars.sh
 
 . /lib/lsb/init-functions
diff -ubrN etc_v10/init.d/umountnfs.sh etc_v11/init.d/umountnfs.sh
--- etc_v10/init.d/umountnfs.sh	2006-01-12 11:47:11.000000000 +0100
+++ etc_v11/init.d/umountnfs.sh	2006-01-22 20:50:11.000000000 +0100
@@ -10,7 +10,7 @@
 #                    usbfs, sysfs) that are not mounted at the top level.
 ### END INIT INFO
 
-PATH=/sbin:/bin:/usr/sbin:/usr/bin
+PATH=/usr/sbin:/usr/bin:/sbin:/bin
 KERNEL="$(uname -s)"
 RELEASE="$(uname -r)"
 . /lib/init/vars.sh
diff -ubrN etc_v10/init.d/urandom etc_v11/init.d/urandom
--- etc_v10/init.d/urandom	2006-01-12 13:46:41.000000000 +0100
+++ etc_v11/init.d/urandom	2006-01-22 20:50:11.000000000 +0100
@@ -12,7 +12,7 @@
 
 [ -c /dev/urandom ] || exit 0
 
-PATH=/sbin:/bin:/usr/sbin:/usr/bin
+PATH=/usr/sbin:/usr/bin:/sbin:/bin
 SAVEDFILE=/var/lib/urandom/random-seed
 POOLSIZE=512
 [ -f /proc/sys/kernel/random/poolsize ] && POOLSIZE="$(cat /proc/sys/kernel/random/poolsize)"
diff -ubrN etc_v10/rc0.d/S20sendsigs etc_v11/rc0.d/S20sendsigs
--- etc_v10/rc0.d/S20sendsigs	2006-01-12 12:13:50.000000000 +0100
+++ etc_v11/rc0.d/S20sendsigs	2006-01-22 20:50:11.000000000 +0100
@@ -9,7 +9,7 @@
 # Description: 
 ### END INIT INFO
 
-PATH=/sbin:/bin:/usr/sbin:/usr/bin
+PATH=/usr/sbin:/usr/bin:/sbin:/bin
 
 . /lib/lsb/init-functions
 
diff -ubrN etc_v10/rc0.d/S30urandom etc_v11/rc0.d/S30urandom
--- etc_v10/rc0.d/S30urandom	2006-01-12 13:46:41.000000000 +0100
+++ etc_v11/rc0.d/S30urandom	2006-01-22 20:50:11.000000000 +0100
@@ -12,7 +12,7 @@
 
 [ -c /dev/urandom ] || exit 0
 
-PATH=/sbin:/bin:/usr/sbin:/usr/bin
+PATH=/usr/sbin:/usr/bin:/sbin:/bin
 SAVEDFILE=/var/lib/urandom/random-seed
 POOLSIZE=512
 [ -f /proc/sys/kernel/random/poolsize ] && POOLSIZE="$(cat /proc/sys/kernel/random/poolsize)"
diff -ubrN etc_v10/rc0.d/S31umountnfs.sh etc_v11/rc0.d/S31umountnfs.sh
--- etc_v10/rc0.d/S31umountnfs.sh	2006-01-12 11:47:11.000000000 +0100
+++ etc_v11/rc0.d/S31umountnfs.sh	2006-01-22 20:50:11.000000000 +0100
@@ -10,7 +10,7 @@
 #                    usbfs, sysfs) that are not mounted at the top level.
 ### END INIT INFO
 
-PATH=/sbin:/bin:/usr/sbin:/usr/bin
+PATH=/usr/sbin:/usr/bin:/sbin:/bin
 KERNEL="$(uname -s)"
 RELEASE="$(uname -r)"
 . /lib/init/vars.sh
diff -ubrN etc_v10/rc0.d/S40umountfs etc_v11/rc0.d/S40umountfs
--- etc_v10/rc0.d/S40umountfs	2006-01-12 12:13:50.000000000 +0100
+++ etc_v11/rc0.d/S40umountfs	2006-01-22 20:50:11.000000000 +0100
@@ -9,7 +9,7 @@
 # Description:
 ### END INIT INFO
 
-PATH=/sbin:/bin:/usr/sbin:/usr/bin
+PATH=/usr/sbin:/usr/bin:/sbin:/bin
 . /lib/init/vars.sh
 
 . /lib/lsb/init-functions
diff -ubrN etc_v10/rc0.d/S90halt etc_v11/rc0.d/S90halt
--- etc_v10/rc0.d/S90halt	2006-01-12 12:13:50.000000000 +0100
+++ etc_v11/rc0.d/S90halt	2006-01-22 20:50:11.000000000 +0100
@@ -11,7 +11,7 @@
 # Description:
 ### END INIT INFO
 
-PATH=/sbin:/bin:/usr/sbin:/usr/bin
+PATH=/usr/sbin:/usr/bin:/sbin:/bin
 [ -f /etc/default/halt ] && . /etc/default/halt
 
 . /lib/lsb/init-functions
diff -ubrN etc_v10/rc1.d/S30killprocs etc_v11/rc1.d/S30killprocs
--- etc_v10/rc1.d/S30killprocs	2005-12-01 17:56:21.000000000 +0100
+++ etc_v11/rc1.d/S30killprocs	2006-01-22 20:50:11.000000000 +0100
@@ -8,7 +8,7 @@
 # Short-Description: executed by init(8) upon entering runlevel 1 (single).
 ### END INIT INFO
 
-PATH="/sbin:/bin:/usr/sbin:/usr/bin"
+PATH=/usr/sbin:/usr/bin:/sbin:/bin
 
 . /lib/lsb/init-functions
 
diff -ubrN etc_v10/rc1.d/S90single etc_v11/rc1.d/S90single
--- etc_v10/rc1.d/S90single	2005-11-25 09:39:44.000000000 +0100
+++ etc_v11/rc1.d/S90single	2006-01-17 11:42:07.000000000 +0100
@@ -8,7 +8,7 @@
 # Short-Description: executed by init(8) upon entering runlevel 1 (single).
 ### END INIT INFO
 
-PATH="/sbin:/bin"
+PATH=/sbin:/bin
 
 . /lib/lsb/init-functions
 
diff -ubrN etc_v10/rc6.d/S20sendsigs etc_v11/rc6.d/S20sendsigs
--- etc_v10/rc6.d/S20sendsigs	2006-01-12 12:13:50.000000000 +0100
+++ etc_v11/rc6.d/S20sendsigs	2006-01-22 20:50:11.000000000 +0100
@@ -9,7 +9,7 @@
 # Description: 
 ### END INIT INFO
 
-PATH=/sbin:/bin:/usr/sbin:/usr/bin
+PATH=/usr/sbin:/usr/bin:/sbin:/bin
 
 . /lib/lsb/init-functions
 
diff -ubrN etc_v10/rc6.d/S30urandom etc_v11/rc6.d/S30urandom
--- etc_v10/rc6.d/S30urandom	2006-01-12 13:46:41.000000000 +0100
+++ etc_v11/rc6.d/S30urandom	2006-01-22 20:50:11.000000000 +0100
@@ -12,7 +12,7 @@
 
 [ -c /dev/urandom ] || exit 0
 
-PATH=/sbin:/bin:/usr/sbin:/usr/bin
+PATH=/usr/sbin:/usr/bin:/sbin:/bin
 SAVEDFILE=/var/lib/urandom/random-seed
 POOLSIZE=512
 [ -f /proc/sys/kernel/random/poolsize ] && POOLSIZE="$(cat /proc/sys/kernel/random/poolsize)"
diff -ubrN etc_v10/rc6.d/S31umountnfs.sh etc_v11/rc6.d/S31umountnfs.sh
--- etc_v10/rc6.d/S31umountnfs.sh	2006-01-12 11:47:11.000000000 +0100
+++ etc_v11/rc6.d/S31umountnfs.sh	2006-01-22 20:50:11.000000000 +0100
@@ -10,7 +10,7 @@
 #                    usbfs, sysfs) that are not mounted at the top level.
 ### END INIT INFO
 
-PATH=/sbin:/bin:/usr/sbin:/usr/bin
+PATH=/usr/sbin:/usr/bin:/sbin:/bin
 KERNEL="$(uname -s)"
 RELEASE="$(uname -r)"
 . /lib/init/vars.sh
diff -ubrN etc_v10/rc6.d/S40umountfs etc_v11/rc6.d/S40umountfs
--- etc_v10/rc6.d/S40umountfs	2006-01-12 12:13:50.000000000 +0100
+++ etc_v11/rc6.d/S40umountfs	2006-01-22 20:50:11.000000000 +0100
@@ -9,7 +9,7 @@
 # Description:
 ### END INIT INFO
 
-PATH=/sbin:/bin:/usr/sbin:/usr/bin
+PATH=/usr/sbin:/usr/bin:/sbin:/bin
 . /lib/init/vars.sh
 
 . /lib/lsb/init-functions
diff -ubrN etc_v10/rc6.d/S90reboot etc_v11/rc6.d/S90reboot
--- etc_v10/rc6.d/S90reboot	2006-01-12 13:46:41.000000000 +0100
+++ etc_v11/rc6.d/S90reboot	2006-01-22 20:50:11.000000000 +0100
@@ -10,7 +10,7 @@
 # Description:
 ### END INIT INFO
 
-PATH=/sbin:/bin:/usr/sbin:/usr/bin
+PATH=/usr/sbin:/usr/bin:/sbin:/bin
 
 . /lib/lsb/init-functions
 
diff -ubrN etc_v10/rcS.d/S02mountkernfs.sh etc_v11/rcS.d/S02mountkernfs.sh
--- etc_v10/rcS.d/S02mountkernfs.sh	2006-01-11 19:37:49.000000000 +0100
+++ etc_v11/rcS.d/S02mountkernfs.sh	2006-01-17 12:35:19.000000000 +0100
@@ -9,11 +9,12 @@
 # Description:       Mount initial set of virtual filesystems the kernel
 #                    provides and that are required by everything.
 ### END INIT INFO
+#
+# This script gets called multiple times during boot and is also
+# called in initscripts postinst
+#
 
-# Script needs to be robust and continue when parts fail,
-# so we're NOT setting the "-e" option.
-
-PATH=/lib/init:/bin:/sbin
+PATH=/lib/init:/sbin:/bin
 
 . /lib/lsb/init-functions
 . /lib/init/mount-functions.sh
diff -ubrN etc_v10/rcS.d/S04mountdevsubfs.sh etc_v11/rcS.d/S04mountdevsubfs.sh
--- etc_v10/rcS.d/S04mountdevsubfs.sh	2006-01-12 19:26:32.000000000 +0100
+++ etc_v11/rcS.d/S04mountdevsubfs.sh	2006-01-17 12:35:19.000000000 +0100
@@ -9,11 +9,12 @@
 # Description:       Mount the virtual filesystems the kernel provides
 #                    that ordinarily live under the /dev filesystem.
 ### END INIT INFO
+#
+# This script gets called multiple times during boot and is also
+# called in initscripts postinst
+#
 
-# Script needs to be robust and continue when parts fail,
-# so we're NOT setting the "-e" option.
-
-PATH=/lib/init:/bin:/sbin
+PATH=/lib/init:/sbin:/bin
 TTYGRP=5
 TTYMODE=620
 [ -f /etc/default/devpts ] && . /etc/default/devpts
diff -ubrN etc_v10/rcS.d/S05bootlogd etc_v11/rcS.d/S05bootlogd
--- etc_v10/rcS.d/S05bootlogd	2006-01-12 12:13:32.000000000 +0100
+++ etc_v11/rcS.d/S05bootlogd	2006-01-17 12:29:33.000000000 +0100
@@ -10,7 +10,7 @@
 #                    which logs boot messages.
 ### END INIT INFO
 
-PATH=/sbin:/bin  # No remote fs at start
+PATH=/sbin:/bin
 DAEMON=/sbin/bootlogd
 NAME=bootlogd
 DESC="boot logger"
@@ -43,6 +43,7 @@
 
 case "$ACTION" in
   start)
+  	# PATH is set above
 	log_daemon_msg "Starting $DESC" "$NAME"
 	if [ -d /proc/1/. ]
 	then
diff -ubrN etc_v10/rcS.d/S10checkroot.sh etc_v11/rcS.d/S10checkroot.sh
--- etc_v10/rcS.d/S10checkroot.sh	2006-01-12 13:55:40.000000000 +0100
+++ etc_v11/rcS.d/S10checkroot.sh	2006-01-17 19:41:58.000000000 +0100
@@ -10,7 +10,7 @@
 # Short-Description: Check to root file system.
 ### END INIT INFO
 
-PATH=/lib/init:/bin:/sbin
+PATH=/lib/init:/sbin:/bin
 FSCK_LOGFILE=/var/log/fsck/checkroot
 [ "$FSCKFIX" ] || FSCKFIX=no
 [ "$SULOGIN" ] || SULOGIN=no
@@ -31,20 +31,6 @@
 	MACHINE="$(uname -m)"
 
 	#
-	# Ensure that bdflush (update) is running before any major I/O is
-	# performed (the following fsck is a good example of such activity :).
-	# Only needed for kernels < 2.4.
-	#
-	if [ -x /sbin/update ] && [ "$KERNEL" = Linux ]
-	then
-		case "$RELEASE" in
-			0.*|1.*|2.[0123].*)
-				/sbin/update
-			;;
-		esac
-	fi
-
-	#
 	# Read /etc/fstab, looking for:
 	# 1) The root filesystem, resolving LABEL=*|UUID=* entries to the
 	# 	device node,
@@ -112,21 +98,21 @@
 	# Activate the swap device(s) in /etc/fstab. This needs to be done
 	# before fsck, since fsck can be quite memory-hungry.
 	#
-	doswap=no
+	ENABLE_SWAP=no
 	case "${KERNEL}:${RELEASE}" in
 	  Linux:2.[0123].*)
 		if [ "$swap_on_md" = yes ] && grep -qs resync /proc/mdstat
 		then
 			[ "$VERBOSE" = no ] || log_warning_msg "Not activating swap because RAID array is resyncing."
 		else
-			doswap=yes
+			ENABLE_SWAP=yes
 		fi
 		;;
 	  *)
-		doswap=yes
+		ENABLE_SWAP=yes
 		;;
 	esac
-	if [ "$doswap" = yes ]
+	if [ "$ENABLE_SWAP" = yes ]
 	then
 		if [ "$VERBOSE" = no ]
 		then
@@ -135,7 +121,7 @@
 			log_action_end_msg $?
 		else
 			log_action_msg "Will now activate swap"
-			swapon -a
+			swapon -a -v
 			ES=$?
 			if [ "$ES" = 0 ]
 			then
diff -ubrN etc_v10/rcS.d/S30checkfs.sh etc_v11/rcS.d/S30checkfs.sh
--- etc_v10/rcS.d/S30checkfs.sh	2006-01-12 13:55:40.000000000 +0100
+++ etc_v11/rcS.d/S30checkfs.sh	2006-01-17 11:42:07.000000000 +0100
@@ -10,7 +10,7 @@
 # Short-Description: Check all filesystems.
 ### END INIT INFO
 
-PATH=/bin:/sbin
+PATH=/sbin:/bin
 FSCK_LOGFILE=/var/log/fsck/checkfs
 [ "$FSCKFIX" ] || FSCKFIX=no
 . /lib/init/vars.sh
diff -ubrN etc_v10/rcS.d/S35mountall.sh etc_v11/rcS.d/S35mountall.sh
--- etc_v10/rcS.d/S35mountall.sh	2006-01-12 12:07:57.000000000 +0100
+++ etc_v11/rcS.d/S35mountall.sh	2006-01-17 19:30:42.000000000 +0100
@@ -11,6 +11,7 @@
 # Description:
 ### END INIT INFO
 
+PATH=/sbin:/bin
 [ "$TMPTIME" ] || TMPTIME=0
 . /lib/init/vars.sh
 
@@ -79,10 +80,15 @@
 	# Execute swapon command again, in case we want to swap to
 	# a file on a now mounted filesystem.
 	#
-	[ "$VERBOSE" = no ] || log_action_begin_msg "Activating swapfile swap"
-	swapon -a -e 2>/dev/null  # Stifle "Device or resource busy"
+	if [ "$VERBOSE" = no ]
+	then
+		swapon -a -e 2>/dev/null || :    # Stifle "Device or resource busy"
+	else
+		log_action_begin_msg "Activating swapfile swap"
+		swapon -a -e -v || :
 	# Ignore 255 status
-	[ "$VERBOSE" = no ] || log_action_end_msg 0
+		log_action_end_msg 0
+	fi
 }
 
 case "$1" in
diff -ubrN etc_v10/rcS.d/S40hostname.sh etc_v11/rcS.d/S40hostname.sh
--- etc_v10/rcS.d/S40hostname.sh	2005-12-01 17:56:21.000000000 +0100
+++ etc_v11/rcS.d/S40hostname.sh	2006-01-17 11:42:07.000000000 +0100
@@ -9,6 +9,8 @@
 # Description:
 ### END INIT INFO
 
+PATH=/sbin:/bin
+
 . /lib/lsb/init-functions
 
 do_start () {
diff -ubrN etc_v10/rcS.d/S45mountnfs.sh etc_v11/rcS.d/S45mountnfs.sh
--- etc_v10/rcS.d/S45mountnfs.sh	2006-01-12 11:57:11.000000000 +0100
+++ etc_v11/rcS.d/S45mountnfs.sh	2006-01-17 11:42:07.000000000 +0100
@@ -15,6 +15,7 @@
 #                    this script is getting increasingly inaccurate.
 ### END INIT INFO
 
+PATH=/sbin:/bin
 [ "TMPTIME" ] || TMPTIME=0
 . /lib/init/vars.sh
 
diff -ubrN etc_v10/rcS.d/S55bootmisc.sh etc_v11/rcS.d/S55bootmisc.sh
--- etc_v10/rcS.d/S55bootmisc.sh	2006-01-10 13:14:48.000000000 +0100
+++ etc_v11/rcS.d/S55bootmisc.sh	2006-01-22 20:50:11.000000000 +0100
@@ -9,6 +9,7 @@
 # Description:
 ### END INIT INFO
 
+PATH=/usr/sbin:/usr/bin:/sbin:/bin
 [ "$DELAYLOGIN" ] || DELAYLOGIN=yes
 . /lib/init/vars.sh
 
diff -ubrN etc_v10/rcS.d/S55urandom etc_v11/rcS.d/S55urandom
--- etc_v10/rcS.d/S55urandom	2006-01-12 13:46:41.000000000 +0100
+++ etc_v11/rcS.d/S55urandom	2006-01-22 20:50:11.000000000 +0100
@@ -12,7 +12,7 @@
 
 [ -c /dev/urandom ] || exit 0
 
-PATH=/sbin:/bin:/usr/sbin:/usr/bin
+PATH=/usr/sbin:/usr/bin:/sbin:/bin
 SAVEDFILE=/var/lib/urandom/random-seed
 POOLSIZE=512
 [ -f /proc/sys/kernel/random/poolsize ] && POOLSIZE="$(cat /proc/sys/kernel/random/poolsize)"
diff -ubrN etc_v10/rcS.d/S99stop-bootlogd-single etc_v11/rcS.d/S99stop-bootlogd-single
--- etc_v10/rcS.d/S99stop-bootlogd-single	2006-01-12 12:13:50.000000000 +0100
+++ etc_v11/rcS.d/S99stop-bootlogd-single	2006-01-22 20:50:11.000000000 +0100
@@ -9,6 +9,7 @@
 # Description:       See the bootlogd script
 ### END INIT INFO
 
+PATH=/usr/sbin:/usr/bin:/sbin:/bin
 NAME=stop-bootlogd-single
 DAEMON=/sbin/bootlogd
 


More information about the Pkg-sysvinit-devel mailing list