aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2005-04-15 19:52:40 +0000
committerBill Nottingham <notting@redhat.com>2005-04-15 19:52:40 +0000
commit55a096976082828ee186cd83117f46267268e89c (patch)
tree3211bc4d40112741cafb096e97b84949557cafdc
parente0cc0012518e81e3bad190c50876fda0d7abea4e (diff)
downloadinitscripts-55a096976082828ee186cd83117f46267268e89c.tar
initscripts-55a096976082828ee186cd83117f46267268e89c.tar.gz
initscripts-55a096976082828ee186cd83117f46267268e89c.tar.bz2
initscripts-55a096976082828ee186cd83117f46267268e89c.tar.xz
initscripts-55a096976082828ee186cd83117f46267268e89c.zip
don't error out if hotplug doesn't exist (#140008)
-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