aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/network-functions
diff options
context:
space:
mode:
Diffstat (limited to 'sysconfig/network-scripts/network-functions')
-rw-r--r--sysconfig/network-scripts/network-functions6
1 files changed, 3 insertions, 3 deletions
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions
index 5bfb4724..e937afc2 100644
--- a/sysconfig/network-scripts/network-functions
+++ b/sysconfig/network-scripts/network-functions
@@ -178,13 +178,13 @@ is_available ()
if [ -z "$alias" -o "$alias" = "off" -o "$alias" = "/bin/true" ]; then
return 2
fi
- HOTPLUG=`cat /proc/sys/kernel/hotplug`
+ HOTPLUG=`cat /proc/sys/kernel/hotplug 2>/dev/null`
echo "/etc/hotplug/firmware.agent" > /proc/sys/kernel/hotplug
modprobe $1 > /dev/null 2>&1 || {
- echo "$HOTPLUG" > /proc/sys/kernel/hotplug
+ [ -f /proc/sys/kernel/hotplug ] && echo "$HOTPLUG" > /proc/sys/kernel/hotplug
return 1
}
- echo "$HOTPLUG" > /proc/sys/kernel/hotplug
+ [ -f /proc/sys/kernel/hotplug ] && echo "$HOTPLUG" > /proc/sys/kernel/hotplug
# if it is a mainframe ccwgroup device, configure it before
# trying to rename it:
configure_ccwgroup_device