Merge branch 'always-sort-interfaces' into 'master'
[explorer/interfaces] Always sort output See merge request ungleich-public/cdist!801
This commit is contained in:
commit
b754ae576c
1 changed files with 6 additions and 8 deletions
|
@ -18,13 +18,11 @@
|
|||
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
if command -v ip > /dev/null
|
||||
if command -v ip >/dev/null
|
||||
then
|
||||
ip -o link show | sed -n 's/^[0-9]\+: \(.\+\): <.*/\1/p'
|
||||
|
||||
elif command -v ifconfig > /dev/null
|
||||
ip -o link show | sed -n 's/^[0-9]\+: \(.\+\): <.*/\1/p'
|
||||
elif command -v ifconfig >/dev/null
|
||||
then
|
||||
ifconfig -a \
|
||||
| sed -n -E 's/^(.*)(:[[:space:]]*flags=|Link encap).*/\1/p' \
|
||||
| sort -u
|
||||
fi
|
||||
ifconfig -a | sed -n -E 's/^(.*)(:[[:space:]]*flags=|Link encap).*/\1/p'
|
||||
fi \
|
||||
| sort -u
|
||||
|
|
Loading…
Reference in a new issue