blob: 089b7261193c714ea69e1ca040e5f1d3fe087530 (
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
/sbin/ip route ls | grep -q ^default || {
[ -f /var/lock/subsys/netfs ] && /etc/rc.d/init.d/netfs stop
}
fi
if [ "$2" = "up" ]; then
defdev=$(/sbin/ip route ls | awk '/^default/ { print $NF }')
if [ "$defdev" = "$1" ]; then
/sbin/chkconfig netfs && /etc/rc.d/init.d/netfs start
fi
fi
|