diff --git a/actions/networks b/actions/networks index aeaa2b235..d0c6d7346 100755 --- a/actions/networks +++ b/actions/networks @@ -7,11 +7,10 @@ set -e # Creates network-manager connections. function get-interfaces { - # XXX: Sorting of interfaces is non-numeric - WIRED_IFACES=$(nmcli --terse --fields type,device device | grep "^ethernet:" | cut -d: -f2 | sort) + WIRED_IFACES=$(nmcli --terse --fields type,device device | grep "^ethernet:" | cut -d: -f2 | sort -V) NO_OF_WIRED_IFACES=$(echo $WIRED_IFACES | wc -w) - WIRELESS_IFACES=$(nmcli --terse --fields type,device device | grep "^wifi:" | cut -d: -f2 | sort) + WIRELESS_IFACES=$(nmcli --terse --fields type,device device | grep "^wifi:" | cut -d: -f2 | sort -V) NO_OF_WIRELESS_IFACES=$(echo $WIRELESS_IFACES | wc -w) }