summaryrefslogtreecommitdiff
path: root/scripts/ipmi.init.basic
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2018-07-11 07:36:21 +0200
committerJörg Frings-Fürst <debian@jff.email>2018-07-11 07:36:21 +0200
commit341aee5e3e3625173e4b684cc4166e60f6eb147f (patch)
tree133bb01bc02539bb98f98bfa6807dc084b995bec /scripts/ipmi.init.basic
parent631fa5250443f5441549bf3184830bc34b0c042e (diff)
parent788a8d509d66a15ecb1810599885792a1acaaeb9 (diff)
Merge branch 'release/debian/3.1.1-1'debian/3.1.1-1
Diffstat (limited to 'scripts/ipmi.init.basic')
-rwxr-xr-xscripts/ipmi.init.basic12
1 files changed, 10 insertions, 2 deletions
diff --git a/scripts/ipmi.init.basic b/scripts/ipmi.init.basic
index bff8e55..3321183 100755
--- a/scripts/ipmi.init.basic
+++ b/scripts/ipmi.init.basic
@@ -21,6 +21,8 @@
#=====
#
rv=0
+kver=`uname -r`
+moddir=/lib/modules/$kver/kernel/drivers
start() {
lsmod |grep ipmi_dev >/dev/null
@@ -29,14 +31,14 @@ start() {
# load the ipmi modules, if not already loaded or builtin
cat /proc/kallsyms |grep ipmi_init_msghandler >/dev/null 2>&1
if [ $? -ne 0 ]; then
- modprobe ipmi_msghandler
+ modprobe ipmi_msghandler
fi
cat /proc/kallsyms |grep init_ipmi_si >/dev/null 2>&1
if [ $? -ne 0 ]; then
modprobe ipmi_si
rv=$?
if [ $rv -ne 0 ]; then
- modprobe ipmi_si_drv # try old module name
+ modprobe ipmi_si_drv # try old module name
fi
fi
modprobe ipmi_devintf
@@ -45,6 +47,10 @@ start() {
if [ $? -ne 0 ]; then
modprobe ipmi_watchdog 2>/dev/null
fi
+ if [ -f $moddir/acpi/acpi_ipmi.ko ]; then
+ modprobe acpi_ipmi
+ modprobe power_meter
+ fi
fi
maj=$(cat /proc/devices | awk '/ipmidev/{print $1}')
@@ -58,6 +64,8 @@ stop() {
lsmod |grep ipmi_msghandler >/dev/null
if [ $? -eq 0 ]; then
echo "Stopping OpenIPMI driver ..."
+ rmmod power_meter 2>/dev/null
+ rmmod acpi_ipmi 2>/dev/null
rmmod ipmi_poweroff 2>/dev/null
rmmod ipmi_watchdog 2>/dev/null
rmmod ipmi_devintf 2>/dev/null