[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

rpms/OpenIPMI/devel OpenIPMI.spec, 1.7, 1.8 openipmi.initscript, 1.1, 1.2 openipmi.sysconf, 1.1, 1.2



Author: pknirsch

Update of /cvs/dist/rpms/OpenIPMI/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv2670

Modified Files:
	OpenIPMI.spec openipmi.initscript openipmi.sysconf 
Log Message:
- 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



Index: OpenIPMI.spec
===================================================================
RCS file: /cvs/dist/rpms/OpenIPMI/devel/OpenIPMI.spec,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- OpenIPMI.spec	27 Jun 2005 14:57:04 -0000	1.7
+++ OpenIPMI.spec	4 Jul 2005 12:50:39 -0000	1.8
@@ -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 @@
 
 %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 @@
 %{_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)
 


Index: openipmi.initscript
===================================================================
RCS file: /cvs/dist/rpms/OpenIPMI/devel/openipmi.initscript,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- openipmi.initscript	27 Jun 2005 14:57:04 -0000	1.1
+++ openipmi.initscript	4 Jul 2005 12:50:39 -0000	1.2
@@ -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 @@
     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
-	fi
-	if [ "${IPMI_RADISYS}" = "1" ]; then
-	    modprobe ipmi_radisys || 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
-	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 @@
 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 @@
 #############################################################################
 restart()
 {
-    stop
+    stop_all
     start
 }
 
@@ -162,8 +211,10 @@
 
 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 @@
 	stop-watchdog) stop_watchdog ;;
 	start-powercontrol) start_powercontrol ;;
 	stop-powercontrol) stop_powercontrol ;;
+        stop-all) stop_all ;;
 	*) usage ;;
 esac
 
@@ -193,3 +245,4 @@
 #############################################################################
 # end of file
 #############################################################################
+


Index: openipmi.sysconf
===================================================================
RCS file: /cvs/dist/rpms/OpenIPMI/devel/openipmi.sysconf,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- openipmi.sysconf	27 Jun 2005 14:57:04 -0000	1.1
+++ openipmi.sysconf	4 Jul 2005 12:50:39 -0000	1.2
@@ -13,6 +13,14 @@
 # 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 @@
 # Enable "legacy" interfaces for applications
 # Intel IMB driver interface
 # IPMI_IMB=1
-# Radisys driver interface
-# IPMI_RADISYS=1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]