- Updated initscript to fix missing redhat-lsb bug (#169901)

This commit is contained in:
Phil Knirsch 2005-10-11 12:43:00 +00:00
parent 31e3fcf270
commit 54dcbd54f3
2 changed files with 55 additions and 4 deletions

View File

@ -2,7 +2,7 @@
Summary: OpenIPMI (Intelligent Platform Management Interface) library and tools Summary: OpenIPMI (Intelligent Platform Management Interface) library and tools
Name: OpenIPMI Name: OpenIPMI
Version: 1.4.14 Version: 1.4.14
Release: 9 Release: 10
License: GPL License: GPL
Group: System Environment/Base Group: System Environment/Base
URL: http://sourceforge.net/projects/openipmi/ URL: http://sourceforge.net/projects/openipmi/
@ -124,6 +124,9 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/*.a %{_libdir}/*.a
%changelog %changelog
* Tue Oct 11 2005 Phil Knirsch <pknirsch@redhat.com> 1.4.14-10
- Updated initscript to fix missing redhat-lsb bug (#169901)
* Thu Sep 08 2005 Phil Knirsch <pknirsch@redhat.com> 1.4.14-9 * Thu Sep 08 2005 Phil Knirsch <pknirsch@redhat.com> 1.4.14-9
- Another update to latest initscripts from Dell - Another update to latest initscripts from Dell
- Fixed some missing return statements for non-void functions (#164138) - Fixed some missing return statements for non-void functions (#164138)

View File

@ -31,7 +31,50 @@
# #
############################################################################# #############################################################################
# for log_success_msg and friends # for log_success_msg and friends
[ -r /lib/lsb/init-functions ] && . /lib/lsb/init-functions if [ -r /lib/lsb/init-functions ]; then
# LSB, SLES, ...
. /lib/lsb/init-functions
elif [ -r /etc/init.d/functions ]; then
# Red Hat / VMware
. /etc/init.d/functions
my_log_message()
{
ACTION=$1
shift
case "$ACTION" in
success)
echo -n $*
success "$*"
echo
;;
failure)
echo -n $*
failure "$*"
echo
;;
warning)
echo -n $*
warning "$*"
echo
;;
*)
;;
esac
}
log_success_msg()
{
my_log_message success "$*"
}
log_failure_msg()
{
my_log_message failure "$*"
}
log_warning_msg()
{
my_log_message warning "$*"
}
fi
CONFIGFILE=/etc/sysconfig/ipmi CONFIGFILE=/etc/sysconfig/ipmi
# source config info # source config info
@ -225,7 +268,12 @@ start_powercontrol_common()
{ {
local poweroff_opts="" local poweroff_opts=""
load_hw_modules load_hw_modules
[ "${IPMI_POWERCYCLE}" == "1" ] && poweroff_opts="poweroff_control=2" if [ "${IPMI_POWERCYCLE}" == "1" ]; then
modinfo ipmi_poweroff 2>/dev/null | grep poweroff_control > /dev/null 2>&1 && \
poweroff_opts="poweroff_control=2"
modinfo ipmi_poweroff 2>/dev/null | grep poweroff_powercycle > /dev/null 2>&1 && \
poweroff_opts="poweroff_powercycle=1"
fi
modprobe ipmi_poweroff "${poweroff_opts}" > /dev/null 2>&1 modprobe ipmi_poweroff "${poweroff_opts}" > /dev/null 2>&1
modules_loaded ipmi_poweroff modules_loaded ipmi_poweroff
[ ${OnePlusUnloaded} -ne 0 ] && [ ${OnePlusUnloaded} -ne 0 ] &&
@ -290,7 +338,7 @@ unload_ipmi_modules_leave_features()
for m in ${MODULES_INTERFACES}; do for m in ${MODULES_INTERFACES}; do
modprobe -q -r ${m} > /dev/null 2>&1 modprobe -q -r ${m} > /dev/null 2>&1
done done
lsmod | egrep -q "ipmi_(poweroff|watchdog)" lsmod | egrep -q "ipmi_(poweroff|watchdog)" > /dev/null 2>&1
if [ "$?" -ne "0" ]; then if [ "$?" -ne "0" ]; then
stop_watchdog_quiet stop_watchdog_quiet
stop_powercontrol_quiet stop_powercontrol_quiet