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

Petter Reinholdtsen pere at costa.debian.org
Tue Sep 5 13:50:04 UTC 2006


Author: pere
Date: 2006-09-05 13:50:04 +0000 (Tue, 05 Sep 2006)
New Revision: 827

Modified:
   sysvinit/trunk/debian/changelog
   sysvinit/trunk/debian/initscripts/etc/network/if-up.d/mountnfs
Log:
  * Mount netdev file systems when the network interfaces are enabled.
    (Closes: #383123)

Modified: sysvinit/trunk/debian/changelog
===================================================================
--- sysvinit/trunk/debian/changelog	2006-09-05 13:13:12 UTC (rev 826)
+++ sysvinit/trunk/debian/changelog	2006-09-05 13:50:04 UTC (rev 827)
@@ -25,6 +25,8 @@
   * Split killall5, last, lastb, mesg and pidof out of the sysvinit
     package into a new sysvutils package to make it easier to replace
     init. (Closes: #385722)
+  * Mount netdev file systems when the network interfaces are enabled.
+    (Closes: #383123)
 
  -- Petter Reinholdtsen <pere at debian.org>  Wed, 26 Jul 2006 11:37:23 +0200
 

Modified: sysvinit/trunk/debian/initscripts/etc/network/if-up.d/mountnfs
===================================================================
--- sysvinit/trunk/debian/initscripts/etc/network/if-up.d/mountnfs	2006-09-05 13:13:12 UTC (rev 826)
+++ sysvinit/trunk/debian/initscripts/etc/network/if-up.d/mountnfs	2006-09-05 13:50:04 UTC (rev 827)
@@ -28,6 +28,7 @@
 
 	portmap=no
 	gss_or_idmap=no
+	mount_netdev=no
 	while read DEV MTPT FSTYPE OPTS REST
 	do
 		case "$DEV" in
@@ -39,6 +40,9 @@
 		  noauto|*,noauto|noauto,*|*,noauto,*)
 			continue
 			;;
+		  _netdev|*,_netdev|_netdev,*|*,_netdev,*)
+			mount_netdev=yes
+			;;
 		esac
 		case "$FSTYPE" in
 		  nfs|nfs4)
@@ -118,6 +122,30 @@
 
 		mount_all_nfs
 	fi
+	if [ "$mount_netdev" = yes ]; then
+		mount_all_netdev() { mount -a -O _netdev ; }
+		if [ "$VERBOSE" = no ]
+		then
+			MOUNT_OUT="$(LC_ALL=C mount_all_netdev)"
+			ES=$?
+			echo "$MOUNT_OUT" | sed -e '/already mounted/d' -e '/nothing was mounted/d'
+			if [ 0 = "$ES" ] || [ 96 = "$ES" ] || [ 64 = "$ES" ]
+			then
+				log_action_end_msg 0
+			else
+				log_action_end_msg 1 "code $ES"
+			fi
+		else
+			mount_all_netdev
+			ES=$?
+			if [ 0 = "$ES" ] || [ 96 = "$ES" ] || [ 64 = "$ES" ]
+			then
+				log_success_msg "Done mounting remote filesystems."
+			else
+				log_failure_msg "Mounting remote filesystems failed with error code ${ES}."
+			fi
+		fi
+	fi
 }
 
 




More information about the Pkg-sysvinit-commits mailing list