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

Petter Reinholdtsen pere at hungry.com
Tue Sep 12 09:42:10 UTC 2006


[Andreas Tille]
> You can beat me with a large club but there is no change at all in
> the output.

Very, very strange.  Is the symlink /etc/rc6.d/S*umountfs pointing to
the correct file?

Perhaps we should continue debugging this on IRC, #pkg-sysvinit on
irc.debian.org to speed up the round trip time. :)

> The problem occures also on machines where actually no NFS mounts
> are active and only are mounted at user request.  I could even try
> to disable NFS completely on my laptop to verify whether it has any
> connection to NFS.

Good to know.  Then we can rule out the NFs issue.

> It really seems to be the case.  At least there is no sign that the
> changed umountfs is called at any time.

Then we need to move up one bit.  Try adding 'set -x' to
/etc/init.d/rc as well, to get the details of the script that should
have called umountfs.

> Well, neither the PATH nor the -x showed any result.  My personal
> way of debugging would be to revert the changes of
> initscripts_2.86.ds1-11 step by step and look what happens.

Well, The problem is that the changes between -10 and -11 were mostly
documentation changes, and the PATH change.  So if the PATH change did
not affect this issue, I fail to see how the documentation change
could. :/

> Try to build a reasonable "intermediate diff" between ds1-10 and
> ds1-11 and I will see what happens here.  If it works the problem is
> in the other half of the diffs if it fails we are closer to the
> problem and try another intermediate diff.  What about this?  (You
> notice the idea was born from the conditioning as experimental
> physicis. ;-)) )

Here is a diff for the source with all the PATH-related changes.  I
just noticed that the patch for init was also changed to change the
PATH of init itself.  Perhaps that is the source of your problems?
Anyway, try this change and see if it help.  You will need to
binary-patch /sbin/init or rebuild from source.

Index: debian/patches/64_init_set_PATH.dpatch
===================================================================
--- debian/patches/64_init_set_PATH.dpatch	(revisjon 638)
+++ debian/patches/64_init_set_PATH.dpatch	(revisjon 681)
@@ -40,7 +40,7 @@
  
  /* Default path inherited by every child. */
 -#define PATH_DFL   "PATH=/bin:/usr/bin:/sbin:/usr/sbin"
-+#define PATH_DEFAULT   "/bin:/sbin:/usr/bin:/usr/sbin"
++#define PATH_DEFAULT   "/usr/sbin:/usr/bin:/sbin:/bin"
  
  
  /* Prototypes. */
Index: debian/initscripts/etc/init.d/checkfs.sh
===================================================================
--- debian/initscripts/etc/init.d/checkfs.sh	(revisjon 638)
+++ debian/initscripts/etc/init.d/checkfs.sh	(revisjon 681)
@@ -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
Index: debian/initscripts/etc/init.d/sendsigs
===================================================================
--- debian/initscripts/etc/init.d/sendsigs	(revisjon 638)
+++ debian/initscripts/etc/init.d/sendsigs	(revisjon 681)
@@ -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
 
Index: debian/initscripts/etc/init.d/umountfs
===================================================================
--- debian/initscripts/etc/init.d/umountfs	(revisjon 638)
+++ debian/initscripts/etc/init.d/umountfs	(revisjon 681)
@@ -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
Index: debian/initscripts/etc/init.d/single
===================================================================
--- debian/initscripts/etc/init.d/single	(revisjon 638)
+++ debian/initscripts/etc/init.d/single	(revisjon 681)
@@ -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
 
Index: debian/initscripts/etc/init.d/mountnfs.sh
===================================================================
--- debian/initscripts/etc/init.d/mountnfs.sh	(revisjon 638)
+++ debian/initscripts/etc/init.d/mountnfs.sh	(revisjon 681)
@@ -15,6 +15,7 @@
 #                    this script is getting increasingly inaccurate.
 ### END INIT INFO
 
+PATH=/sbin:/bin
 [ "TMPTIME" ] || TMPTIME=0
 . /lib/init/vars.sh
 
Index: debian/initscripts/etc/init.d/mountkernfs.sh
===================================================================
--- debian/initscripts/etc/init.d/mountkernfs.sh	(revisjon 638)
+++ debian/initscripts/etc/init.d/mountkernfs.sh	(revisjon 681)
@@ -9,12 +9,13 @@
 # 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:/sbin:/bin
 
-PATH=/lib/init:/bin:/sbin
-
 . /lib/lsb/init-functions
 . /lib/init/mount-functions.sh
 
Index: debian/initscripts/etc/init.d/skeleton
===================================================================
--- debian/initscripts/etc/init.d/skeleton	(revisjon 638)
+++ debian/initscripts/etc/init.d/skeleton	(revisjon 681)
@@ -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
Index: debian/initscripts/etc/init.d/hostname.sh
===================================================================
--- debian/initscripts/etc/init.d/hostname.sh	(revisjon 638)
+++ debian/initscripts/etc/init.d/hostname.sh	(revisjon 681)
@@ -9,6 +9,8 @@
 # Description:
 ### END INIT INFO
 
+PATH=/sbin:/bin
+
 . /lib/lsb/init-functions
 
 do_start () {
Index: debian/initscripts/etc/init.d/halt
===================================================================
--- debian/initscripts/etc/init.d/halt	(revisjon 638)
+++ debian/initscripts/etc/init.d/halt	(revisjon 681)
@@ -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
Index: debian/initscripts/etc/init.d/bootmisc.sh
===================================================================
--- debian/initscripts/etc/init.d/bootmisc.sh	(revisjon 638)
+++ debian/initscripts/etc/init.d/bootmisc.sh	(revisjon 681)
@@ -9,6 +9,7 @@
 # Description:
 ### END INIT INFO
 
+PATH=/usr/sbin:/usr/bin:/sbin:/bin
 [ "$DELAYLOGIN" ] || DELAYLOGIN=yes
 . /lib/init/vars.sh
 
Index: debian/initscripts/etc/init.d/checkroot.sh
===================================================================
--- debian/initscripts/etc/init.d/checkroot.sh	(revisjon 638)
+++ debian/initscripts/etc/init.d/checkroot.sh	(revisjon 681)
@@ -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
Index: debian/initscripts/etc/init.d/reboot
===================================================================
--- debian/initscripts/etc/init.d/reboot	(revisjon 638)
+++ debian/initscripts/etc/init.d/reboot	(revisjon 681)
@@ -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
 
Index: debian/initscripts/etc/init.d/killprocs
===================================================================
--- debian/initscripts/etc/init.d/killprocs	(revisjon 638)
+++ debian/initscripts/etc/init.d/killprocs	(revisjon 681)
@@ -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
 
Index: debian/initscripts/etc/init.d/mountall.sh
===================================================================
--- debian/initscripts/etc/init.d/mountall.sh	(revisjon 638)
+++ debian/initscripts/etc/init.d/mountall.sh	(revisjon 681)
@@ -11,6 +11,7 @@
 # Description:
 ### END INIT INFO
 
+PATH=/sbin:/bin
 [ "$TMPTIME" ] || TMPTIME=0
 . /lib/init/vars.sh
 
Index: debian/initscripts/etc/init.d/urandom
===================================================================
--- debian/initscripts/etc/init.d/urandom	(revisjon 638)
+++ debian/initscripts/etc/init.d/urandom	(revisjon 681)
@@ -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)"
Index: debian/initscripts/etc/init.d/umountnfs.sh
===================================================================
--- debian/initscripts/etc/init.d/umountnfs.sh	(revisjon 638)
+++ debian/initscripts/etc/init.d/umountnfs.sh	(revisjon 681)
@@ -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
Index: debian/initscripts/etc/init.d/bootlogd
===================================================================
--- debian/initscripts/etc/init.d/bootlogd	(revisjon 638)
+++ debian/initscripts/etc/init.d/bootlogd	(revisjon 681)
@@ -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"
Index: debian/initscripts/etc/init.d/stop-bootlogd-single
===================================================================
--- debian/initscripts/etc/init.d/stop-bootlogd-single	(revisjon 638)
+++ debian/initscripts/etc/init.d/stop-bootlogd-single	(revisjon 681)
@@ -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
 
Index: debian/initscripts/etc/init.d/mountdevsubfs.sh
===================================================================
--- debian/initscripts/etc/init.d/mountdevsubfs.sh	(revisjon 638)
+++ debian/initscripts/etc/init.d/mountdevsubfs.sh	(revisjon 681)
@@ -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




More information about the Pkg-sysvinit-devel mailing list