[Pkg-sysvinit-commits] r831 -
sysvinit/trunk/debian/initscripts/etc/network/if-up.d
Petter Reinholdtsen
pere at costa.debian.org
Tue Sep 5 14:35:08 UTC 2006
Author: pere
Date: 2006-09-05 14:35:07 +0000 (Tue, 05 Sep 2006)
New Revision: 831
Modified:
sysvinit/trunk/debian/initscripts/etc/network/if-up.d/mountnfs
Log:
Minor cleanup.
Modified: sysvinit/trunk/debian/initscripts/etc/network/if-up.d/mountnfs
===================================================================
--- sysvinit/trunk/debian/initscripts/etc/network/if-up.d/mountnfs 2006-09-05 14:25:37 UTC (rev 830)
+++ sysvinit/trunk/debian/initscripts/etc/network/if-up.d/mountnfs 2006-09-05 14:35:07 UTC (rev 831)
@@ -27,8 +27,9 @@
exec 9<&0 </etc/fstab
portmap=no
+ NETFS=""
+ NETDEV=""
gss_or_idmap=no
- mount_netdev=no
while read DEV MTPT FSTYPE OPTS REST
do
case "$DEV" in
@@ -41,7 +42,7 @@
continue
;;
_netdev|*,_netdev|_netdev,*|*,_netdev,*)
- mount_netdev=yes
+ NETDEV=yes
;;
esac
case "$FSTYPE" in
@@ -103,8 +104,9 @@
fi
#
- # Initialize nfs-common (which starts rpc.gssd and/or rpc.idmapd, and loads
- # the right kernel modules if applicable) if we use Kerberos and/or NFSv4 mounts.
+ # Initialize nfs-common (which starts rpc.gssd and/or
+ # rpc.idmapd, and loads the right kernel modules if
+ # applicable) if we use Kerberos and/or NFSv4 mounts.
#
if [ "$gss_or_idmap" = yes ] && [ -x /etc/init.d/nfs-common ]
then
@@ -113,38 +115,10 @@
if [ "$NETFS" ]
then
- mount_all_nfs() { mount -a -t$NETFS ; }
-
- # Accept 64 or 96 (32/mount failure + 64/some mount succeeded)
- # as valid return statuses from mount. This partly works around
- # the problem of mount reporting an error status when
- # some filesystems are already mounted.
-
- mount_all_nfs
+ mount -a -t$NETFS
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
+ if [ "$NETDEV" ]; then
+ mount -a -O _netdev
fi
}
More information about the Pkg-sysvinit-commits
mailing list