--- a/init.d/netmount.in +++ a/init.d/netmount.in @@ -17,22 +17,23 @@ depend() start() { - local x= fs= rc= - for x in $net_fs_list $extra_net_fs_list; do - case "$x" in - nfs|nfs4) - continue - ;; - esac - fs="$fs${fs:+,}$x" - done - + local rc= ebegin "Mounting network filesystems" - mount -at $fs - rc=$? if [ "$RC_UNAME" = Linux ]; then mount -a -O _netdev rc=$? + else + local x= fs= + for x in $net_fs_list $extra_net_fs_list; do + case "$x" in + nfs|nfs4) + continue + ;; + esac + fs="$fs${fs:+,}$x" + done + mount -at $fs + rc=$? fi ewend $rc "Could not mount all network filesystems" return 0 @@ -40,45 +41,44 @@ start() stop() { - local x= fs= - ebegin "Unmounting network filesystems" - . "$RC_LIBEXECDIR"/sh/rc-mount.sh - - for x in $net_fs_list $extra_net_fs_list; do - case "$x" in - nfs|nfs4) - continue - ;; - *) - fs="$fs${fs:+,}$x" - ;; - esac - done - if [ -n "$fs" ]; then - umount -at $fs || eerror "Failed to simply unmount filesystems" - fi - - eindent - fs= - for x in $net_fs_list $extra_net_fs_list; do - case "$x" in - nfs|nfs4) - continue - ;; - *) - fs="$fs${fs:+|}$x" - ;; - esac - done - [ -n "$fs" ] && fs="^($fs)$" - do_unmount umount ${fs:+--fstype-regex} $fs --netdev - retval=$? - - eoutdent if [ "$RC_UNAME" = Linux ]; then umount -a -O _netdev retval=$? + else + local x= fs= + . "$RC_LIBEXECDIR"/sh/rc-mount.sh + + for x in $net_fs_list $extra_net_fs_list; do + case "$x" in + nfs|nfs4) + continue + ;; + *) + fs="$fs${fs:+,}$x" + ;; + esac + done + if [ -n "$fs" ]; then + umount -at $fs || eerror "Failed to simply unmount filesystems" + fi + + eindent + fs= + for x in $net_fs_list $extra_net_fs_list; do + case "$x" in + nfs|nfs4) + continue + ;; + *) + fs="$fs${fs:+|}$x" + ;; + esac + done + [ -n "$fs" ] && fs="^($fs)$" + do_unmount umount ${fs:+--fstype-regex} $fs --netdev + retval=$? + eoutdent fi eend $retval "Failed to unmount network filesystems" }