- Updated initscript to fix missing redhat-lsb bug (#169901)
This commit is contained in:
		
							parent
							
								
									31e3fcf270
								
							
						
					
					
						commit
						54dcbd54f3
					
				| @ -2,7 +2,7 @@ | ||||
| Summary: OpenIPMI (Intelligent Platform Management Interface) library and tools | ||||
| Name: OpenIPMI | ||||
| Version: 1.4.14 | ||||
| Release: 9 | ||||
| Release: 10 | ||||
| License: GPL | ||||
| Group: System Environment/Base | ||||
| URL: http://sourceforge.net/projects/openipmi/ | ||||
| @ -124,6 +124,9 @@ rm -rf $RPM_BUILD_ROOT | ||||
| %{_libdir}/*.a | ||||
| 
 | ||||
| %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 | ||||
| - Another update to latest initscripts from Dell | ||||
| - Fixed some missing return statements for non-void functions (#164138) | ||||
|  | ||||
| @ -31,7 +31,50 @@ | ||||
| # | ||||
| ############################################################################# | ||||
| # 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 | ||||
| # source config info | ||||
| @ -225,7 +268,12 @@ start_powercontrol_common() | ||||
| { | ||||
| 	local poweroff_opts="" | ||||
| 	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 | ||||
| 	modules_loaded ipmi_poweroff | ||||
| 	[ ${OnePlusUnloaded} -ne 0 ] && | ||||
| @ -290,7 +338,7 @@ unload_ipmi_modules_leave_features() | ||||
| 	for m in ${MODULES_INTERFACES}; do | ||||
| 		modprobe -q -r ${m} > /dev/null 2>&1 | ||||
| 	done | ||||
| 	lsmod | egrep -q "ipmi_(poweroff|watchdog)" | ||||
| 	lsmod | egrep -q "ipmi_(poweroff|watchdog)" > /dev/null 2>&1 | ||||
| 	if [ "$?" -ne "0" ]; then | ||||
| 		stop_watchdog_quiet | ||||
| 		stop_powercontrol_quiet | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user