aboutsummaryrefslogtreecommitdiffstats
path: root/NetworkManager/dispatcher.d/05-netfs
blob: bd558464fe8a18401312348012e5f49ed111172e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

export LC_ALL=C
export SYSTEMCTL_SKIP_REDIRECT=1

if [ "$2" = "down" ]; then
	/sbin/ip route ls | grep -q ^default || {
		[ -f /var/lock/subsys/netfs ] && /etc/rc.d/init.d/netfs stop || :
	} && { :; }
fi

if [ "$2" = "up" ]; then
	/sbin/ip -o route show dev "$1" | grep -q '^default' && {
		/sbin/chkconfig netfs && /etc/rc.d/init.d/netfs start || :
	} || { :; }
fi