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 | |
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')
-rw-r--r-- | sysconfig/network-scripts/DEADJOE | 43 | ||||
-rwxr-xr-x | sysconfig/network-scripts/ifdown | 2 | ||||
-rw-r--r-- | sysconfig/network-scripts/network-functions | 4 |
3 files changed, 46 insertions, 3 deletions
diff --git a/sysconfig/network-scripts/DEADJOE b/sysconfig/network-scripts/DEADJOE new file mode 100644 index 00000000..8455dc78 --- /dev/null +++ b/sysconfig/network-scripts/DEADJOE @@ -0,0 +1,43 @@ + +*** These modified files were found in JOE when it aborted on Wed Feb 17 16:12:28 2010 +*** JOE was aborted by UNIX signal 15 + +*** File '(Unnamed)' +PM +PM +\n +\n +</groupid>\n +<groupid> +addit +ncurses-term +optional +\n + +*** File '(Unnamed)' +ccw +ccw +%ch +%ch +loopback +loop +network +>base< +status +status + +*** File '(Unnamed)' +Makefile +Makefile +network-manager.c +/home/notting/tmp/mutt-nostromo-2166-21994-1 +/home/notting/tmp/mutt-nostromo-2166-21994-1 +/home/notting/tmp/mutt-nostromo-2166-21994-22 +/home/notting/tmp/mutt-nostromo-2166-21994-22 +network-functions +network-functions +ifup-eth +network-functions +network-functions +network-functions +network-functions diff --git a/sysconfig/network-scripts/ifdown b/sysconfig/network-scripts/ifdown index addf7345..f308d317 100755 --- a/sysconfig/network-scripts/ifdown +++ b/sysconfig/network-scripts/ifdown @@ -43,7 +43,7 @@ fi if [ "$USE_NM" = "true" ]; then if [ -n "$UUID" -a -z "$DEVICE" ]; then - DEVICE=$(nmcli con status | awk "\$4 == \"$UUID\" { print \$3 }") + DEVICE=$(nmcli -t --fields uuid,devices con status | awk -F ':' "\$1 == \"$UUID\" { print \$2 }") fi if [ -n "$DEVICE" ] && is_nm_active "$DEVICE" ; then nmcli dev disconnect iface "$DEVICE" 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 |