Unverified Commit d2f13810 authored by Aristo Chen's avatar Aristo Chen Committed by GitHub
Browse files

Exclude unavailable interface for nmcli (#144)

parent 28e2a34f
......@@ -367,7 +367,7 @@ function jobs ()
if [[ -n $SYSTEMDNET ]]; then
systemd_ip_editor "${SELECTED_ADAPTER}"
else
if [[ -n $(LC_ALL=C nmcli device status | grep $SELECTED_ADAPTER ) ]]; then
if [[ -n $(LC_ALL=C nmcli device status | grep $SELECTED_ADAPTER | grep -v unavailable ) ]]; then
nm_ip_editor "$SELECTED_ADAPTER"
else
ip_editor "$SELECTED_ADAPTER" "$SELECTED_ADAPTER" "/etc/network/interfaces"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment