xref: /openbmc/ipmitool/contrib/ipmi.init.basic (revision c18ec02f3304ce2a889a50e378f07a4168af3884)
1*c18ec02fSPetter Reinholdtsen#!/bin/sh
2*c18ec02fSPetter Reinholdtsen
3*c18ec02fSPetter Reinholdtsenecho "Setting up OpenIPMI driver..."
4*c18ec02fSPetter Reinholdtsen
5*c18ec02fSPetter Reinholdtsen# load the ipmi modules
6*c18ec02fSPetter Reinholdtsenmodprobe ipmi_msghandler
7*c18ec02fSPetter Reinholdtsenmodprobe ipmi_devintf
8*c18ec02fSPetter Reinholdtsenif ! modprobe ipmi_si_drv ; then
9*c18ec02fSPetter Reinholdtsen	modprobe ipmi_si # try new module name
10*c18ec02fSPetter Reinholdtsenfi
11*c18ec02fSPetter Reinholdtsen
12*c18ec02fSPetter Reinholdtsenmaj=$(cat /proc/devices | awk '/ipmidev/{print $1}')
13*c18ec02fSPetter Reinholdtsenif [ "$maj" ]; then
14*c18ec02fSPetter Reinholdtsen    test -e /dev/ipmi0 && rm -f /dev/ipmi0
15*c18ec02fSPetter Reinholdtsen    /bin/mknod /dev/ipmi0 c $maj 0
16*c18ec02fSPetter Reinholdtsenfi
17*c18ec02fSPetter Reinholdtsen
18