blob: b3ba12c7d2f9a4e1b0c338255edeb8604b3abfc6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#!/bin/sh
export LC_ALL=C
if [ "$2" = "down" ]; then
ip route ls | grep -q ^default || {
[ -f /var/lock/subsys/netfs ] && /etc/rc.d/init.d/netfs stop
}
fi
if [ "$2" = "up" ]; then
defdev=$(ip route ls | awk '/^default/ { print $NF }')
if [ "$defdev" = "$1" ]; then
/sbin/chkconfig netfs && /etc/rc.d/init.d/netfs start
fi
fi
|