diff options
author | Bill Nottingham <notting@redhat.com> | 2008-04-01 13:08:42 -0400 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2008-04-01 13:08:42 -0400 |
commit | 4e13324684839d4dfbe97ff2b7023d07ac6dc4a5 (patch) | |
tree | abe16b6493291280677929830083e26ee64efcb0 /NetworkManager/dispatcher.d | |
parent | 9a45bd97790ebfdb5ceb137b013c40943b996055 (diff) | |
download | initscripts-4e13324684839d4dfbe97ff2b7023d07ac6dc4a5.tar initscripts-4e13324684839d4dfbe97ff2b7023d07ac6dc4a5.tar.gz initscripts-4e13324684839d4dfbe97ff2b7023d07ac6dc4a5.tar.bz2 initscripts-4e13324684839d4dfbe97ff2b7023d07ac6dc4a5.tar.xz initscripts-4e13324684839d4dfbe97ff2b7023d07ac6dc4a5.zip |
Run as a NetworkManagerDispatcher script (#439242)
Diffstat (limited to 'NetworkManager/dispatcher.d')
-rwxr-xr-x | NetworkManager/dispatcher.d/05-netfs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/NetworkManager/dispatcher.d/05-netfs b/NetworkManager/dispatcher.d/05-netfs new file mode 100755 index 00000000..b3ba12c7 --- /dev/null +++ b/NetworkManager/dispatcher.d/05-netfs @@ -0,0 +1,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 + |