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

export LC_ALL=C

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