From 462db3ecfb1aad47105e6efccff9e55cef83f42f Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 23 Apr 2008 15:29:52 -0400 Subject: do a much better check for network availability Avoids nasty 'FAILED' messages when using NetworkManager. --- rc.d/init.d/netfs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'rc.d') diff --git a/rc.d/init.d/netfs b/rc.d/init.d/netfs index 6769c132..1ad100bb 100755 --- a/rc.d/init.d/netfs +++ b/rc.d/init.d/netfs @@ -17,9 +17,6 @@ . /etc/init.d/functions . /etc/sysconfig/network -# Check that networking is up. -[ "${NETWORKING}" = "no" ] && exit 0 - NFSFSTAB=`LC_ALL=C awk '!/^#/ && $3 ~ /^nfs/ && $3 != "nfsd" && $4 !~ /noauto/ { print $2 }' /etc/fstab` SMBFSTAB=`LC_ALL=C awk '!/^#/ && $3 == "smbfs" && $4 !~ /noauto/ { print $2 }' /etc/fstab` CIFSFSTAB=`LC_ALL=C awk '!/^#/ && $3 == "cifs" && $4 !~ /noauto/ { print $2 }' /etc/fstab` @@ -35,6 +32,7 @@ NETDEVMTAB=`LC_ALL=C awk '$4 ~ /_netdev/ && $2 != "/" { print $2 }' /etc/mtab` # See how we were called. case "$1" in start) + [ ! -f /var/lock/subsys/network -a ! -f /var/lock/subsys/NetworkManager ] && exit 0 [ -n "$NFSFSTAB" ] && { [ ! -f /var/lock/subsys/rpcbind ] && service rpcbind start -- cgit v1.2.1