[Pkg-sysvinit-commits] r1134 - sysvinit/trunk/debian/initscripts/etc/network/if-up.d
pere at alioth.debian.org
pere at alioth.debian.org
Thu Dec 27 09:53:24 UTC 2007
Author: pere
Date: 2007-12-27 09:53:24 +0000 (Thu, 27 Dec 2007)
New Revision: 1134
Modified:
sysvinit/trunk/debian/initscripts/etc/network/if-up.d/mountnfs
Log:
Move check into separate function, and after the /var/run/network is created.
Modified: sysvinit/trunk/debian/initscripts/etc/network/if-up.d/mountnfs
===================================================================
--- sysvinit/trunk/debian/initscripts/etc/network/if-up.d/mountnfs 2007-12-27 09:50:00 UTC (rev 1133)
+++ sysvinit/trunk/debian/initscripts/etc/network/if-up.d/mountnfs 2007-12-27 09:53:24 UTC (rev 1134)
@@ -113,14 +113,7 @@
post_mountall
}
-# Using 'no !=' instead of 'yes =' to make sure async nfs mounting is
-# the default even without a value in /etc/default/rcS
-if [ no != "$ASYNCMOUNTNFS" ]; then
- # Not for loopback!
- [ "$IFACE" != "lo" ] || exit 0
-
- # Wait until all auto interfaces are up before attemting to mount
- # network file systems.
+exit_unless_last_interface() {
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
@@ -134,10 +127,21 @@
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
+if [ no != "$ASYNCMOUNTNFS" ]; then
+ # Not for loopback!
+ [ "$IFACE" != "lo" ] || exit 0
+
# Lock around this otherwise insanity may occur
mkdir /var/run/network 2>/dev/null || true
+ # Wait until all auto interfaces are up before attemting to mount
+ # network file systems.
+ exit_unless_last_interface
+
if mkdir /var/run/network/mountnfs 2>/dev/null ; then
:
else
More information about the Pkg-sysvinit-commits
mailing list