[Pkg-sysvinit-commits] r1127 - in sysvinit/trunk/debian: . initscripts/etc/network/if-up.d

pere at alioth.debian.org pere at alioth.debian.org
Thu Dec 27 08:58:42 UTC 2007


Author: pere
Date: 2007-12-27 08:58:42 +0000 (Thu, 27 Dec 2007)
New Revision: 1127

Modified:
   sysvinit/trunk/debian/changelog
   sysvinit/trunk/debian/initscripts/etc/network/if-up.d/mountnfs
Log:
  * Rewrote ifup-down.d/mountnfs to wait for all 'auto' interfaces to
    be initialized before trying to mount network file systems
    (Closes: 386959, 390404, 418596, 419195, 426071, 428823, 432511,
    432511, 432750, 433119, 434177).  Based on patch from Phil
    Snowdon.

Modified: sysvinit/trunk/debian/changelog
===================================================================
--- sysvinit/trunk/debian/changelog	2007-12-27 08:20:11 UTC (rev 1126)
+++ sysvinit/trunk/debian/changelog	2007-12-27 08:58:42 UTC (rev 1127)
@@ -10,6 +10,11 @@
   * Mount a 1 MiB tmpfs on /tmp if /tmp is otherwise less than
     1 MiB to make sure one can still log in when /tmp/ is too
     full (Closes: #430814).  Based on patch from Ian Jackson and Ubuntu.
+  * Rewrote ifup-down.d/mountnfs to wait for all 'auto' interfaces to
+    be initialized before trying to mount network file systems
+    (Closes: 386959, 390404, 418596, 419195, 426071, 428823, 432511,
+    432511, 432750, 433119, 434177).  Based on patch from Phil
+    Snowdon.
 
  -- Petter Reinholdtsen <pere at debian.org>  Wed, 26 Dec 2007 23:04:56 +0100
 

Modified: sysvinit/trunk/debian/initscripts/etc/network/if-up.d/mountnfs
===================================================================
--- sysvinit/trunk/debian/initscripts/etc/network/if-up.d/mountnfs	2007-12-27 08:20:11 UTC (rev 1126)
+++ sysvinit/trunk/debian/initscripts/etc/network/if-up.d/mountnfs	2007-12-27 08:58:42 UTC (rev 1127)
@@ -113,6 +113,20 @@
 	post_mountall
 }
 
+# Wait until all auto interfaces are up before attemting to mount
+# network file systems.
+grep "^[:space:]*auto" /etc/network/interfaces  | \
+    sed -e 's/[ \t]*auto[ \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 NFS mounts"
+	log_warning_msg "$msg"
+	mkdir /var/run/network/mountnfs_earlyexit 2> /dev/null
+    fi
+done
+if [ -d /var/run/network/mountnfs_earlyexit ]; then
+    rmdir /var/run/network/mountnfs_earlyexit 2>/dev/null
+    exit 0
+fi
 
 # Using 'no !=' instead of 'yes =' to make sure async nfs mounting is
 # the default even without a value in /etc/default/rcS




More information about the Pkg-sysvinit-commits mailing list