diff options
Diffstat (limited to 'rc.d/init.d/network')
-rwxr-xr-x | rc.d/init.d/network | 37 |
1 files changed, 9 insertions, 28 deletions
diff --git a/rc.d/init.d/network b/rc.d/init.d/network index fbe67dd9..0da31c60 100755 --- a/rc.d/init.d/network +++ b/rc.d/init.d/network @@ -157,22 +157,6 @@ case "$1" in is_available $i continue fi - # If we're in confirmation mode, get user confirmation. - [ -f /var/run/confirm ] && - { - confirm $i - case $? in - 0) - : - ;; - 2) - CONFIRM= - ;; - *) - continue - ;; - esac - } action "Bringing up interface %s: " $i ./ifup $DEVICE boot [ $? -ne 0 ] && rc=1 done @@ -180,11 +164,6 @@ case "$1" in # Bring up xDSL and VPN interfaces for i in $vlaninterfaces $bridgeinterfaces $xdslinterfaces $vpninterfaces ; do if ! LANG=C grep -EL "^ONBOOT=['\"]?[Nn][Oo]['\"]?" "ifcfg-$i" >/dev/null 2>&1 ; then - # If we're in confirmation mode, get user confirmation. - if [ -f /var/run/confirm ]; then - confirm $i - test $? = 1 && continue - fi action "Bringing up interface %s: " $i ./ifup $i boot [ $? -ne 0 ] && rc=1 fi @@ -192,9 +171,13 @@ case "$1" in # Add non interface-specific static-routes. if [ -f /etc/sysconfig/static-routes ]; then - grep "^any" /etc/sysconfig/static-routes | while read ignore args ; do - /sbin/route add -$args - done + if [ -x /sbin/route ]; then + grep "^any" /etc/sysconfig/static-routes | while read ignore args ; do + /sbin/route add -$args + done + else + net_log $"Legacy static-route support not available: /sbin/route not found" + fi fi # IPv6 hook (post IPv4 start) @@ -220,10 +203,8 @@ case "$1" in # If this is a final shutdown/halt, check for network FS, # and unmount them even if the user didn't turn on netfs if [ "$RUNLEVEL" = "6" -o "$RUNLEVEL" = "0" -o "$RUNLEVEL" = "1" ]; then - NFSMTAB=$(LC_ALL=C awk '$3 ~ /^nfs/ { print $2 }' /proc/mounts) - SMBMTAB=$(LC_ALL=C awk '$3 == "smbfs" { print $2 }' /proc/mounts) - NCPMTAB=$(LC_ALL=C awk '$3 == "ncpfs" { print $2 }' /proc/mounts) - if [ -n "$NFSMTAB" -o -n "$SMBMTAB" -o -n "$NCPMTAB" ] ; then + NETMOUNTS=$(findmnt -n -m -t nfs,nfs4,smbfs,ncpfs,cifs 2>/dev/null) + if [ -n "$NETMOUNTS" ] ; then /etc/init.d/netfs stop fi fi |