/which/command -v/

Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
Steven Armstrong 2012-06-25 20:19:10 +02:00
commit d13a201cd0
8 changed files with 9 additions and 9 deletions

View file

@ -24,12 +24,12 @@
#
# Use ip, if available
if which ip >/dev/null 2>&1; then
if command -v ip; then
ip -o link show | sed -n 's/^[0-9]\+: \(.\+\): <.*/\1/p'
exit 0
fi
if ! which ifconfig >/dev/null 2>&1; then
if ! command -v ifconfig; then
# no ifconfig, nothing we could do
exit 0
fi