summaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/network-functions
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2004-09-17 20:36:22 +0000
committerBill Nottingham <notting@redhat.com>2004-09-17 20:36:22 +0000
commitc7433f688c5d200ce7e42fba6e53bc0d0c96c647 (patch)
treee62de32722c6c6f909c3defb0bbcab31f6c837be /sysconfig/network-scripts/network-functions
parenta9f425e580d8b01f1ff95fd0e5660de8fdeed259 (diff)
fix handling of nonexistent devices (#132839)
Diffstat (limited to 'sysconfig/network-scripts/network-functions')
-rw-r--r--sysconfig/network-scripts/network-functions3
1 files changed, 3 insertions, 0 deletions
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions
index a9667bb7..c071f837 100644
--- a/sysconfig/network-scripts/network-functions
+++ b/sysconfig/network-scripts/network-functions
@@ -193,6 +193,9 @@ is_available ()
configure_ccwgroup_device
if [ -n "$HWADDR" ]; then
local curdev=`ip -o link | awk -F ':' -vIGNORECASE=1 '/$HWADDR/ { print $2 }'`
+ if [ -z "$curdev" ]; then
+ return 1
+ fi
rename_device "$1" "$HWADDR" "$curdev"
fi
LC_ALL= LANG= ip -o link | grep -q $1