[Pkg-sysvinit-devel] Bug#612378: initscripts: /etc/network/if-up.d/mountnfs fails to mount if interfaces separated by more than one space
Eugeniy Mikhailov
evgmik at gmail.com
Tue Feb 8 04:47:08 UTC 2011
Package: initscripts
Version: 2.88dsf-13.1
Severity: normal
Tags: patch
/etc/network/if-up.d/mountnfs does not check for repeating white spacing
while parsing /etc/network/interfaces for the interfaces listed as
'auto'.
For example if /etc/network/interfaces has line: 'auto lo eth0'
the function exit_unless_last_interface fails
If this line changed to 'auto lo eth0' with only one space
between lo and eth0, everything works fine.
The simple patch for this is attached
-- System Information:
Debian Release: 6.0
APT prefers stable
APT policy: (990, 'stable')
Architecture: i386 (i686)
Kernel: Linux 2.6.32-5-686 (SMP w/1 CPU core)
Locale: LANG=C, LC_CTYPE=ru_RU.KOI8-R (charmap=KOI8-R)
Shell: /bin/sh linked to /bin/bash
-------------- next part --------------
--- /etc/network/if-up.d/mountnfs.dpkg-bak 2011-02-07 23:07:00.000000000 -0500
+++ /etc/network/if-up.d/mountnfs 2011-02-07 23:07:13.000000000 -0500
@@ -117,7 +117,7 @@
exit_unless_last_interface() {
grep "^[:space:]*auto" /etc/network/interfaces | \
- sed -e 's/[ \t]*auto[ \t]*//;s/[ \t]*$//;s/[ \t]/\n/g' | \
+ sed -e 's/[ \t]*auto[ \t]*//;s/[ \t]*$//;s/[ \t]\+/\n/g' | \
while read i; do
if [ `grep -c $i /etc/network/run/ifstate` -eq "0" ]; then
msg="if-up.d/mountnfs[$IFACE]: waiting for interface $i before doing NFS mounts"
More information about the Pkg-sysvinit-devel
mailing list