diff options
author | Anatoliy Guskov <anatoliy.guskov@gmail.com> | 2008-04-01 20:15:47 +0000 |
---|---|---|
committer | Anatoliy Guskov <anatoliy.guskov@gmail.com> | 2008-04-01 20:15:47 +0000 |
commit | 6c3a74187bbf171879d661cb4aef4855a6e1a780 (patch) | |
tree | 0428e01e789e1058dad13e421b00527b1b36320f /NetworkManager | |
parent | 28449ed320a5db88453b4cbd767ecae5b7934fdc (diff) | |
parent | e3a871a31826536fa3cb52b70fed1e7e4b9c6c30 (diff) | |
download | initscripts-6c3a74187bbf171879d661cb4aef4855a6e1a780.tar initscripts-6c3a74187bbf171879d661cb4aef4855a6e1a780.tar.gz initscripts-6c3a74187bbf171879d661cb4aef4855a6e1a780.tar.bz2 initscripts-6c3a74187bbf171879d661cb4aef4855a6e1a780.tar.xz initscripts-6c3a74187bbf171879d661cb4aef4855a6e1a780.zip |
Merge branch 'master' of ssh://git.fedorahosted.org/git/initscripts
Diffstat (limited to 'NetworkManager')
-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 + |