Package: initscripts Version: 2.86-5ubuntu6 Severity: important Tags: patch
While shutting down or rebooting, the system hangs om the /etc/init.d/networking script, while "Deconfiguring network interfaces" I'm running ubuntu myself, but after searching the web i found the same problem also resides on sarge. I found 3(!) problems causing it! In my case I had to fix all 3 of the problems before it finally worked. 1) An important cause of this is that the networking script is called after unmounting local filesystems, causing the /etc/network/ifstate file to be read-only if it's on the root partition. So in /etc/rc0.d and /etc/rc6.d the umountfs script should be S40umountfs (like in woody) instead of S34umountfs. 2) The loopback interface should be excluded from shutting down (again: like in woody). 3) the if-else construction in the "stop" part of the script, regarding verbosity, doesn't seem to work (while the sh syntax looks ok to me btw). Taking point 2 and 3 together, the "stop" part of the script should look like this: [CODE] stop) if sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\1 \2/p' /proc/mounts | grep -q "^/ nfs$"; then log_failure_msg "NOT deconfiguring network interfaces: / is an NFS mount" elif sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\1 \2/p' /proc/mounts | grep -q "^/ smbfs$"; then log_failure_msg "NOT deconfiguring network interfaces: / is an SMB mount" elif sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\2/p' /proc/mounts | grep -qE '^(nfs|smbfs|ncp|coda)$'; then log_failure_msg "NOT deconfiguring network interfaces: network shares still mounted." elif [ "$VERBOSE" != no ]; then log_begin_msg "Deconfiguring network interfaces..." ifdown -a --exclude=lo log_end_msg $? else log_begin_msg "Deconfiguring network interfaces..." ifdown -a --exclude=lo >/dev/null 2>&1 log_end_msg $? fi ;; [/CODE] You can see that I merged the if-else construcion regarding the verbosity in the if-elif-else construction that was already there. However the syntax looked ok, it still didn't work for me. Another weird thing that caught my attention is that when I turned on verbosity (without changing anything else), the script didn't hang, but logged a "failed" message. This pointed my attention in the direction of the if-else construction. Well, that's about it I guess. I hope you will fix this soon. For any questions you can send me an email. -- System Information: Debian Release: 3.1 Architecture: i386 (i686) Kernel: Linux 2.6.10-5-386 Locale: LANG=nl_NL.UTF-8, LC_CTYPE=nl_NL.UTF-8 (charmap=UTF-8) Versions of packages initscripts depends on: ii coreutils 5.2.1-2ubuntu0 The GNU core utilities ii dpkg 1.10.27ubuntu1 Package maintenance system for Deb ii e2fsprogs 1.35-8ubuntu2 The EXT2 file system utilities and ii libc6 2.3.2.ds1-20ubuntu13 GNU C Library: Shared libraries an ii lsb-base 2.0-1ubuntu2 Linux Standard Base 1.3 initscript ii mount 2.12p-2ubuntu2 Tools for mounting and manipulatin ii util-linux 2.12p-2ubuntu2 Miscellaneous system utilities -- no debconf information