#!/bin/sh # Try to mount network filesystems. IP=/sbin/ip CHKCONFIG=/sbin/chkconfig SERVICE=/sbin/service case "$2" in up) $CHKCONFIG netfs 2>/dev/null && $SERVICE netfs reload >/dev/null 2>&1 ||: ;; down) # "down" action runs when interface already down, # so it is too late to unmount network filesystems at that time. # And there is no "pre-down" action yet. # See ALT bug #27013. # [ $($IP route show | wc -l) -eq 0 ] && # $SERVICE netfs status >/dev/null 2>&1 && # $SERVICE netfs stop >/dev/null 2>&1 ||: ;; esac