diff options
author | Bill Nottingham <notting@redhat.com> | 2010-05-05 12:20:00 -0400 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2010-05-05 12:22:26 -0400 |
commit | b7b1dd681a8e4be91054548c850bd0e2ab5cf22a (patch) | |
tree | 9c19c9ef87d78f6be17bcde7a27f7d04e39f6a0e /sysconfig/network-scripts/network-functions | |
parent | db39310a4c5dd9f9fd471bb1b2ccc0e048617613 (diff) | |
download | initscripts-b7b1dd681a8e4be91054548c850bd0e2ab5cf22a.tar initscripts-b7b1dd681a8e4be91054548c850bd0e2ab5cf22a.tar.gz initscripts-b7b1dd681a8e4be91054548c850bd0e2ab5cf22a.tar.bz2 initscripts-b7b1dd681a8e4be91054548c850bd0e2ab5cf22a.tar.xz initscripts-b7b1dd681a8e4be91054548c850bd0e2ab5cf22a.zip |
Update for new nmcli syntax.
Diffstat (limited to 'sysconfig/network-scripts/network-functions')
-rw-r--r-- | sysconfig/network-scripts/network-functions | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions index d64d8dbc..a3131301 100644 --- a/sysconfig/network-scripts/network-functions +++ b/sysconfig/network-scripts/network-functions @@ -195,12 +195,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 |