aboutsummaryrefslogtreecommitdiffstats
path: root/NetworkManager/dispatcher.d/05-netfs
blob: 46d4bb4250f21706408c8dddee8439d9d73839a7 (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