aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/network-functions
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2010-05-05 12:20:00 -0400
committerBill Nottingham <notting@redhat.com>2010-05-05 12:20:00 -0400
commit2b784ad0b77c5a4f15e9af1535ed79b35d8ae6f4 (patch)
tree286ec7fc69739f6f21c2f90cac184f68faa4d809 /sysconfig/network-scripts/network-functions
parent722c1ebc058e181c65996b32f3a1147159969975 (diff)
downloadinitscripts-2b784ad0b77c5a4f15e9af1535ed79b35d8ae6f4.tar
initscripts-2b784ad0b77c5a4f15e9af1535ed79b35d8ae6f4.tar.gz
initscripts-2b784ad0b77c5a4f15e9af1535ed79b35d8ae6f4.tar.bz2
initscripts-2b784ad0b77c5a4f15e9af1535ed79b35d8ae6f4.tar.xz
initscripts-2b784ad0b77c5a4f15e9af1535ed79b35d8ae6f4.zip
Update for new nmcli syntax.initscripts-9.12-1
Diffstat (limited to 'sysconfig/network-scripts/network-functions')
-rw-r--r--sysconfig/network-scripts/network-functions4
1 files changed, 2 insertions, 2 deletions
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions
index c8846ef8..9fc84bca 100644
--- a/sysconfig/network-scripts/network-functions
+++ b/sysconfig/network-scripts/network-functions
@@ -201,12 +201,12 @@ do_netreport ()
is_nm_running ()
{
- LANG=C nmcli nm status 2>/dev/null| grep -Eq "NM running:[[:space:]]+running"
+ [ "$(LANG=C nmcli -t --fields running nm status 2>/dev/null)" = "running" ]
}
is_nm_active ()
{
- LANG=C nmcli -t dev status 2>/dev/null| grep -Eq "^${1}[[:space:]]*.*[[:space:]]*connected"
+ LANG=C nmcli -t --fields device,state dev status 2>/dev/null | grep -q "^${1}:connected$"
}
# Sets $alias to the device module if $? != 0