aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2010-05-13 17:24:11 -0400
committerBill Nottingham <notting@redhat.com>2010-05-13 17:24:11 -0400
commit87ef4eb3bb8cedf478f944c5375f2b586e116974 (patch)
tree7dc89faa2658afc3247f11f568d93cbe39df6ba3
parent1d302c88d122a9fb8050438753617d2f7da1d5ca (diff)
downloadinitscripts-87ef4eb3bb8cedf478f944c5375f2b586e116974.tar
initscripts-87ef4eb3bb8cedf478f944c5375f2b586e116974.tar.gz
initscripts-87ef4eb3bb8cedf478f944c5375f2b586e116974.tar.bz2
initscripts-87ef4eb3bb8cedf478f944c5375f2b586e116974.tar.xz
initscripts-87ef4eb3bb8cedf478f944c5375f2b586e116974.zip
Behave sanely if we're not passed a device at all. (#589521, #592108)
-rw-r--r--sysconfig/network-scripts/network-functions2
1 files changed, 2 insertions, 0 deletions
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions
index b8db6bdf..013286ca 100644
--- a/sysconfig/network-scripts/network-functions
+++ b/sysconfig/network-scripts/network-functions
@@ -212,6 +212,8 @@ is_nm_active ()
# Sets $alias to the device module if $? != 0
is_available ()
{
+ [ -z "$1" ] && return 1
+
[ -d "/sys/class/net/$1" ] && return 0
[ -n "$BONDING_OPTS" ] && install_bonding_driver $1