- Updated versions of the initscripts and sysconf files
- Fixed typo in preun script and changelog - Don't autostart ipmi as done in the updated initscript
This commit is contained in:
parent
547b3c5c0d
commit
c57b4dd4d8
@ -2,7 +2,7 @@
|
||||
Summary: OpenIPMI (Intelligent Platform Management Interface) library and tools
|
||||
Name: OpenIPMI
|
||||
Version: 1.4.14
|
||||
Release: 1
|
||||
Release: 3
|
||||
License: GPL
|
||||
Group: System Environment/Base
|
||||
URL: http://sourceforge.net/projects/openipmi/
|
||||
@ -76,7 +76,7 @@ install -m 755 %SOURCE4 ${RPM_BUILD_ROOT}%{_initrddir}/ipmi
|
||||
|
||||
%preun
|
||||
if [ $1 = 0 ]; then
|
||||
service impi stop >/dev/null 2>&1
|
||||
service ipmi stop >/dev/null 2>&1
|
||||
/sbin/chkconfig --del ipmi
|
||||
fi
|
||||
|
||||
@ -124,10 +124,14 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_libdir}/*.a
|
||||
|
||||
%changelog
|
||||
* Mon Jul 04 2005 Phil Knirsch <pknirsch@redhat.com> 1.4.12-3
|
||||
- Updated versions of the initscripts and sysconf files
|
||||
- Fixed typo in preun script and changelog
|
||||
|
||||
* Mon Jun 27 2005 Phil Knirsch <pknirsch@redhat.com> 1.4.14-2
|
||||
- Updated to OpenIPMI-1.4.14
|
||||
- Split the main package into normal and libs package for multilib support
|
||||
- Added impitool-1.8.2 to OpenIPMI and put it in tools package
|
||||
- Added ipmitool-1.8.2 to OpenIPMI and put it in tools package
|
||||
- Added sysconf and initscript (#158270)
|
||||
- Fixed oob subscripts (#149142)
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
# Authors: Matt Domsch <Matt_Domsch@dell.com>
|
||||
# Chris Poblete <Chris_Poblete@dell.com>
|
||||
#
|
||||
# chkconfig: - 04 96
|
||||
# chkconfig: 2345 04 96
|
||||
# description: OpenIPMI Driver init script
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
@ -39,87 +39,128 @@ if [ "${kernel}" == "2.4" ]; then
|
||||
IPMI_SI_MODULE_NAME="ipmi_si_drv"
|
||||
fi
|
||||
|
||||
MODULES="ipmi_radisys ipmi_imb ipmi_poweroff ipmi_watchdog \
|
||||
ipmi_devintf ${IPMI_SMB_MODULE_NAME} ${IPMI_SI_MODULE_NAME} \
|
||||
ipmi_msghandler"
|
||||
MODULES_INTERFACES="ipmi_imb ipmi_devintf"
|
||||
MODULES_FEATURES="ipmi_watchdog ipmi_poweroff"
|
||||
MODULES_HW="${IPMI_SMB_MODULE_NAME} ${IPMI_SI_MODULE_NAME}"
|
||||
MODULES_BASE="ipmi_msghandler"
|
||||
MODULES="${MODULES_INTERFACES} ${MODULES_FEATURES} ${MODULES_HW} ${MODULES_BASE}"
|
||||
|
||||
|
||||
RETVAL=0
|
||||
LOCKFILE=/var/lock/subsys/ipmi
|
||||
|
||||
|
||||
#############################################################################
|
||||
load_si()
|
||||
{
|
||||
if [ "${IPMI_SI}" = "1" ]; then
|
||||
modprobe ${IPMI_SI_MODULE_NAME} || RETVAL=1
|
||||
fi
|
||||
}
|
||||
|
||||
load_smb()
|
||||
{
|
||||
if [ "${IPMI_SMB}" = "1" ]; then
|
||||
modprobe ${IPMI_SMB_MODULE_NAME} || RETVAL=1
|
||||
fi
|
||||
}
|
||||
|
||||
load_hw_modules()
|
||||
{
|
||||
load_si
|
||||
load_smb
|
||||
}
|
||||
|
||||
start_watchdog()
|
||||
{
|
||||
if [ "${IPMI_WATCHDOG}" = "1" ]; then
|
||||
modprobe ipmi_watchdog || RETVAL=2
|
||||
load_hw_modules
|
||||
modprobe ipmi_watchdog ${IPMI_WATCHDOG_OPTIONS} || RETVAL=2
|
||||
if [ ! -x /sbin/udev -a ! -e /dev/watchdog ]; then
|
||||
mknod -m 0600 /dev/watchdog 10 130 || RETVAL=2
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
stop_watchdog()
|
||||
{
|
||||
modprobe -r ipmi_watchdog
|
||||
modprobe -q -r ipmi_watchdog
|
||||
[ ! -x /sbin/udev ] && rm /dev/watchdog
|
||||
}
|
||||
|
||||
start_powercontrol()
|
||||
{
|
||||
local poweroff_opts=""
|
||||
if [ "${IPMI_POWEROFF}" = "1" ]; then
|
||||
[ "${IPMI_POWERCYCLE}" == "1" ] && poweroff_opts="chassis_ctrl_cmd_param=2"
|
||||
load_hw_modules
|
||||
[ "${IPMI_POWERCYCLE}" == "1" ] && poweroff_opts="poweroff_control=2"
|
||||
modprobe ipmi_poweroff "${poweroff_opts}" || RETVAL=2
|
||||
fi
|
||||
}
|
||||
|
||||
stop_powercontrol()
|
||||
{
|
||||
modprobe -r ipmi_poweroff
|
||||
modprobe -q -r ipmi_poweroff
|
||||
}
|
||||
|
||||
#############################################################################
|
||||
unload_all_ipmi_modules()
|
||||
{
|
||||
[ ! -x /sbin/udev ] && rm -f "/dev/ipmi${INTF_NUM}"
|
||||
stop_watchdog
|
||||
for m in ${MODULES}; do
|
||||
modprobe -q -r ${m}
|
||||
done
|
||||
}
|
||||
|
||||
unload_ipmi_modules_leave_features()
|
||||
{
|
||||
[ ! -x /sbin/udev ] && rm -f "/dev/ipmi${INTF_NUM}"
|
||||
for m in ${MODULES_INTERFACES}; do
|
||||
modprobe -q -r ${m}
|
||||
done
|
||||
lsmod | egrep -q "ipmi_poweroff|ipmi_watchdog"
|
||||
if [ "$?" -ne "0" ]; then
|
||||
stop_watchdog
|
||||
for m in ${MODULES}; do
|
||||
modprobe -q -r ${m}
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
#############################################################################
|
||||
load_ipmi_modules ()
|
||||
{
|
||||
modprobe ipmi_msghandler || RETVAL=1
|
||||
if [ "${IPMI_SI}" = "1" ]; then
|
||||
modprobe ${IPMI_SI_MODULE_NAME} || RETVAL=1
|
||||
fi
|
||||
if [ "${IPMI_SMB}" = "1" ]; then
|
||||
modprobe ${IPMI_SMB_MODULE_NAME} || RETVAL=1
|
||||
fi
|
||||
[ "${RETVAL}" = "1" ] && return
|
||||
load_hw_modules
|
||||
[ "${RETVAL}" = "1" ] && unload_all_ipmi_modules && return
|
||||
|
||||
start_watchdog
|
||||
start_powercontrol
|
||||
|
||||
if [ "${DEV_IPMI}" = "1" ]; then
|
||||
modprobe ipmi_devintf || RETVAL=2
|
||||
if [ "${RETVAL}" != "2" ]; then
|
||||
# Note, this really should be done by udev on 2.6
|
||||
DEVMAJOR=`cat /proc/devices | awk '/ipmidev/{print $1}'`
|
||||
mknod -m 0600 /dev/ipmi${INTF_NUM} c ${DEVMAJOR} 0 || RETVAL=2
|
||||
ln -sf /dev/ipmi${INTF_NUM} /dev/ipmi || RETVAL=2
|
||||
if [ ! -x /sbin/udev ]; then
|
||||
DEVMAJOR=`cat /proc/devices | awk '/ipmidev/{print $1}'`
|
||||
mknod -m 0600 /dev/ipmi${INTF_NUM} c ${DEVMAJOR} 0 || RETVAL=2
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
start_watchdog
|
||||
start_powercontrol
|
||||
if [ "${IPMI_IMB}" = "1" ]; then
|
||||
modprobe ipmi_imb || RETVAL=2
|
||||
# FIXME create canonical /dev/foo entry
|
||||
if [ "${RETVAL}" != "2" ]; then
|
||||
DEVMAJOR=`cat /proc/devices | awk '/imb/{print $1}'`
|
||||
mknod -m 0600 /dev/imb c ${DEVMAJOR} 0 || RETVAL=2
|
||||
fi
|
||||
fi
|
||||
if [ "${IPMI_RADISYS}" = "1" ]; then
|
||||
modprobe ipmi_radisys || RETVAL=2
|
||||
# FIXME create canonical /dev/foo entry
|
||||
fi
|
||||
return
|
||||
}
|
||||
|
||||
#############################################################################
|
||||
unload_ipmi_modules()
|
||||
{
|
||||
# Note, deleting these /dev files really should be done by udev
|
||||
# so this function will change soon as the driver changes
|
||||
# to allow such to happen automatically.
|
||||
rm -f "/dev/ipmi${INTF_NUM}"
|
||||
rm -f "/dev/ipmi"
|
||||
for m in ${MODULES}; do
|
||||
modprobe -q -r ${m}
|
||||
done
|
||||
# Per Corey Minyard, essentially no one uses ipmi_radisys
|
||||
# and we don't want to encourage its further use
|
||||
# so it won't be handled here.
|
||||
return
|
||||
}
|
||||
|
||||
#############################################################################
|
||||
@ -136,7 +177,15 @@ start()
|
||||
stop()
|
||||
{
|
||||
echo -n $"Stopping ${MODULE_NAME} drivers: "
|
||||
unload_ipmi_modules
|
||||
unload_ipmi_modules_leave_features
|
||||
rm -f ${LOCKFILE}
|
||||
log_success_msg
|
||||
}
|
||||
|
||||
stop_all()
|
||||
{
|
||||
echo -n $"Stopping ${MODULE_NAME} drivers: "
|
||||
unload_all_ipmi_modules
|
||||
rm -f ${LOCKFILE}
|
||||
log_success_msg
|
||||
}
|
||||
@ -144,7 +193,7 @@ stop()
|
||||
#############################################################################
|
||||
restart()
|
||||
{
|
||||
stop
|
||||
stop_all
|
||||
start
|
||||
}
|
||||
|
||||
@ -162,8 +211,10 @@ status ()
|
||||
|
||||
usage ()
|
||||
{
|
||||
echo $"Usage: $0 {start|stop|status|restart|condrestart|"
|
||||
echo $" start-watchdog|stop-watchdog|start-powercontrol|stop-powercontrol}" 1>&2
|
||||
echo $"Usage: $0 {start|stop|status|restart|condrestart|" 1>&2
|
||||
echo $" start-watchdog|stop-watchdog|" 1>&2
|
||||
echo $" start-powercontrol|stop-powercontrol|" 1>&2
|
||||
echo $" stop-all}" 1>&2
|
||||
RETVAL=1
|
||||
}
|
||||
|
||||
@ -185,6 +236,7 @@ case "$1" in
|
||||
stop-watchdog) stop_watchdog ;;
|
||||
start-powercontrol) start_powercontrol ;;
|
||||
stop-powercontrol) stop_powercontrol ;;
|
||||
stop-all) stop_all ;;
|
||||
*) usage ;;
|
||||
esac
|
||||
|
||||
@ -193,3 +245,4 @@ exit ${RETVAL}
|
||||
#############################################################################
|
||||
# end of file
|
||||
#############################################################################
|
||||
|
||||
|
@ -13,6 +13,14 @@ DEV_IPMI=1
|
||||
# Enable IPMI_WATCHDOG if you want the IPMI watchdog
|
||||
# to reboot the system if it hangs
|
||||
# IPMI_WATCHDOG=1
|
||||
#
|
||||
# Watchdog options - modinfo ipmi_watchdog for details
|
||||
# watchdog timeout value in seconds
|
||||
# as there is no userspace ping application that runs during shutdown,
|
||||
# be sure to give it enough time for any device drivers to
|
||||
# do their cleanup (e.g. megaraid cache flushes)
|
||||
# without the watchdog triggering prematurely
|
||||
IPMI_WATCHDOG_OPTIONS="timeout=60"
|
||||
|
||||
# Enable IPMI_POWEROFF if you want the IPMI
|
||||
# poweroff module to be loaded.
|
||||
@ -26,5 +34,3 @@ DEV_IPMI=1
|
||||
# Enable "legacy" interfaces for applications
|
||||
# Intel IMB driver interface
|
||||
# IPMI_IMB=1
|
||||
# Radisys driver interface
|
||||
# IPMI_RADISYS=1
|
||||
|
Loading…
Reference in New Issue
Block a user