diff options
author | Bill Nottingham <notting@redhat.com> | 2010-05-13 17:24:11 -0400 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2010-05-13 17:24:11 -0400 |
commit | 87ef4eb3bb8cedf478f944c5375f2b586e116974 (patch) | |
tree | 7dc89faa2658afc3247f11f568d93cbe39df6ba3 | |
parent | 1d302c88d122a9fb8050438753617d2f7da1d5ca (diff) | |
download | initscripts-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-functions | 2 |
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 |