aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/network-functions
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2010-02-17 15:32:22 -0500
committerBill Nottingham <notting@redhat.com>2010-03-01 16:03:37 -0500
commitec7c088ad300e79a4bed6310c3a19e6c9bc03c4e (patch)
treec97c2ce9a3b933ccab002637d54a61a39625be31 /sysconfig/network-scripts/network-functions
parent1733f15b20d44fe195550d81e98dd3c68b0c8d3b (diff)
downloadinitscripts-ec7c088ad300e79a4bed6310c3a19e6c9bc03c4e.tar
initscripts-ec7c088ad300e79a4bed6310c3a19e6c9bc03c4e.tar.gz
initscripts-ec7c088ad300e79a4bed6310c3a19e6c9bc03c4e.tar.bz2
initscripts-ec7c088ad300e79a4bed6310c3a19e6c9bc03c4e.tar.xz
initscripts-ec7c088ad300e79a4bed6310c3a19e6c9bc03c4e.zip
When bringing devices down, disconnect the device, don't down the connection.
Diffstat (limited to 'sysconfig/network-scripts/network-functions')
-rw-r--r--sysconfig/network-scripts/network-functions5
1 files changed, 5 insertions, 0 deletions
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions
index 8ae752ba..a29c9764 100644
--- a/sysconfig/network-scripts/network-functions
+++ b/sysconfig/network-scripts/network-functions
@@ -200,6 +200,11 @@ is_nm_running ()
LANG=C nmcli nm status | grep -Eq "NM running:[[:space:]]+running"
}
+is_nm_active ()
+{
+ LANG=C nmcli -t dev status | grep -Eq "^${1}[[:space:]]*.*[[:space:]]*connected$"
+}
+
# Sets $alias to the device module if $? != 0
is_available ()
{