Patch from Jordan Hargrave and Chris Poblete, as various versions of
udev have had either /sbin/udev and/or /sbin/udevd, so test for
either.
Patch committed to CVS HEAD and rel_1_4.
Thanks,
Matt
--
Matt Domsch
Software Architect
Dell Linux Solutions linux.dell.com www.dell.com/linux
Linux on Dell mailing lists @ http://lists.us.dell.com
--- ipmi.init.~1.9.~2006-07-07 11:52:16.0 -0500
+++ ipmi.init 2006-07-31 11:29:42.0 -0500
@@ -113,6 +113,11 @@
LOCKFILE=/var/lock/subsys/ipmi
DEV_IPMI_TIMEOUT=15
+UDEV_EXISTS=0
+if [ -e /sbin/udev -o -e /sbin/udevd ]; then
+UDEV_EXISTS=1
+fi
+
#
# NOTES:
# * /dev/ipmi0 is unconditionally deleted here on ipmi_devintf unload,
@@ -207,7 +212,7 @@
RETVAL=$((RETVAL | 2))
log_failure_msg
return
- if [ ! -x /sbin/udevd -a ! -e /dev/watchdog ]; then
+ if [ ${UDEV_EXISTS} -eq 0 -a ! -e /dev/watchdog ]; then
mknod -m 0600 /dev/watchdog c 10 130
[ $? -ne 0 ]
RETVAL=$((RETVAL | 8))
@@ -245,7 +250,7 @@
log_failure_msg
else
if [ ${IPMI_WATCHDOG} = yes ]; then
- [ ! -x /sbin/udevd ] rm -f /dev/watchdog
+ [ ${UDEV_EXISTS} -eq 0 ] rm -f /dev/watchdog
fi
log_success_msg
fi
@@ -259,7 +264,7 @@
RETVAL=$((RETVAL | 32))
else
if [ ${IPMI_WATCHDOG} = yes ]; then
- [ ! -x /sbin/udevd ] rm -f /dev/watchdog
+ [ ${UDEV_EXISTS} -eq 0 ] rm -f /dev/watchdog
fi
fi
}
@@ -368,7 +373,7 @@
RETVAL=$((RETVAL ~2))
[ ${OnePlusLoaded} -eq 0 ] RETVAL=$((RETVAL | 2))
if [ ${OnePlusLoaded} -eq 1 ]; then
- if [ ! -x /sbin/udevd ]; then
+ if [ ${UDEV_EXISTS} -eq 0 ]; then
DEVMAJOR=`cat /proc/devices | awk
'/ipmidev/{print $1}'`
rm -f /dev/ipmi${INTF_NUM}
mknod -m 0600 /dev/ipmi${INTF_NUM} c
${DEVMAJOR} 0 || RETVAL=$((RETVAL | 4))
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Openipmi-developer mailing list
Openipmi-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openipmi-developer