Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Allow OMSA 7.2 to work with RHEL 6.4 #26

Merged
merged 1 commit into from over 1 year ago

1 participant

Marc Remy
Marc Remy
Owner
mremy commented

Provide a patched version of /etc/init.d/dsm_sa_ipmi, waiting next OMSA release.
I hope we can revert this patch asap.

Marc Remy mremy Allow OMSA 7.2 to work with RHEL 6.4
Provide a patched version of /etc/init.d/dsm_sa_ipmi, waiting next OMSA release.
918ade6
Marc Remy mremy merged commit e579a79 into from
Marc Remy mremy closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Mar 14, 2013
Marc Remy mremy Allow OMSA 7.2 to work with RHEL 6.4
Provide a patched version of /etc/init.d/dsm_sa_ipmi, waiting next OMSA release.
918ade6
This page is out of date. Refresh to see the latest.
629 files/etc/init.d/dsm_sa_ipmi.RedHat.6.4
... ... @@ -0,0 +1,629 @@
  1 +#!/bin/sh
  2 +# File managed by Puppet (modified by Camptocamp to run under RHEL 6.4)
  3 +#############################################################################
  4 +#
  5 +# dsm_sa_ipmi: OpenIPMI Driver init script
  6 +#
  7 +# Authors: Matt Domsch <Matt_Domsch@dell.com>
  8 +# Chris Poblete <Chris_Poblete@dell.com>
  9 +#
  10 +# chkconfig: - 04 96
  11 +# description: OpenIPMI Driver init script
  12 +#
  13 +### BEGIN INIT INFO
  14 +# Provides: dsm_sa_ipmi
  15 +# Required-Start: $localfs $remotefs $syslog
  16 +# Required-Stop: $localfs $remotefs $syslog
  17 +# Default-Start:
  18 +# Default-Stop:
  19 +# Short-Description: OpenIPMI Driver init script
  20 +# Description: OpenIPMI Driver init script
  21 +### END INIT INFO
  22 +#
  23 +# Status return code bits
  24 +# no bits set = no errors
  25 +# bit 0 set = minimum modules aren't loaded
  26 +# bit 1 set = requested feature module isn't loaded
  27 +# bit 2 set = /dev/ipmi0 (or /dev/imb if using that instead) doesn't exist
  28 +# bit 3 set = /dev/watchdog doesn't exist
  29 +# bit 4 set = lockfile doesn't exist
  30 +# bit 5 set = modules are loaded even when asked to be unloaded
  31 +
  32 +#
  33 +#############################################################################
  34 +# for log_success_msg and friends
  35 +if [ -r /lib/lsb/init-functions ]; then
  36 +# LSB, SLES, ...
  37 + . /lib/lsb/init-functions
  38 +elif [ -r /etc/init.d/functions ]; then
  39 +# Red Hat / VMware
  40 + . /etc/init.d/functions
  41 + my_log_message()
  42 + {
  43 + ACTION=$1
  44 + shift
  45 +
  46 + case "$ACTION" in
  47 + success)
  48 + echo -n $*
  49 + success "$*"
  50 + echo
  51 + ;;
  52 + failure)
  53 + echo -n $*
  54 + failure "$*"
  55 + echo
  56 + ;;
  57 + warning)
  58 + echo -n $*
  59 + warning "$*"
  60 + echo
  61 + ;;
  62 + *)
  63 + ;;
  64 + esac
  65 + }
  66 + log_success_msg()
  67 + {
  68 + my_log_message success "$*"
  69 + }
  70 + log_failure_msg()
  71 + {
  72 + my_log_message failure "$*"
  73 + }
  74 + log_warning_msg()
  75 + {
  76 + my_log_message warning "$*"
  77 + }
  78 +fi
  79 +
  80 +CONFIGFILE=/etc/sysconfig/dsm_sa_ipmi
  81 +# source config info
  82 +[ -r ${CONFIGFILE} ] && . ${CONFIGFILE}
  83 +
  84 +#############################################################################
  85 +# GLOBALS
  86 +#############################################################################
  87 +MODULE_NAME="dsm_sa_ipmi"
  88 +INTF_NUM=0
  89 +
  90 +IPMI_SMB_MODULE_NAME="ipmi_smb"
  91 +IPMI_SI_MODULE_NAME="ipmi_si"
  92 +kernel=`uname -r | cut -d. -f1-2`
  93 +if [ "${kernel}" == "2.4" ]; then
  94 + IPMI_SMB_MODULE_NAME="ipmi_smb_intf"
  95 + IPMI_SI_MODULE_NAME="ipmi_si_drv"
  96 +fi
  97 +
  98 +MODULES_INTERFACES=""
  99 +[ "${DEV_IPMI}" = "yes" ] && MODULES_INTERFACES="${MODULES_INTERFACES} ipmi_devintf"
  100 +[ "${IPMI_IMB}" = "yes" ] && MODULES_INTERFACES="${MODULES_INTERFACES} ipmi_imb"
  101 +
  102 +MODULES_FEATURES=""
  103 +[ "${IPMI_WATCHDOG}" = "yes" ] && MODULES_FEATURES="${MODULES_FEATURES} ipmi_watchdog"
  104 +[ "${IPMI_POWEROFF}" = "yes" ] && MODULES_FEATURES="${MODULES_FEATURES} ipmi_poweroff"
  105 +
  106 +MODULES_HW=""
  107 +[ "${IPMI_SI}" = "yes" ] && MODULES_HW="${MODULES_HW} ${IPMI_SI_MODULE_NAME}"
  108 +[ "${IPMI_SMB}" = "yes" ] && MODULES_HW="${MODULES_HW} ${IPMI_SMB_MODULE_NAME}"
  109 +
  110 +MODULES_BASE="ipmi_msghandler"
  111 +MODULES="${MODULES_INTERFACES} ${MODULES_FEATURES} ${MODULES_HW} ${MODULES_BASE}"
  112 +
  113 +RETVAL=0
  114 +LOCKFILE=/var/lock/subsys/ipmi
  115 +DEV_IPMI_TIMEOUT=150
  116 +
  117 +UDEV_EXISTS=0
  118 +if [ -e /sbin/udev -o -e /sbin/udevd ]; then
  119 + UDEV_EXISTS=1
  120 +fi
  121 +
  122 +
  123 +#############################################################################
  124 +# NOTES:
  125 +# * /dev/ipmi0 is unconditionally deleted here on ipmi_devintf unload,
  126 +# because SLES9 and RHEL4 kernels don't send a message for udev to delete
  127 +# it for us.
  128 +#
  129 +#############################################################################
  130 +
  131 +modules_loaded_verbose()
  132 +{
  133 + OnePlusLoaded=0
  134 + OnePlusUnloaded=0
  135 + for m in $@; do
  136 + if /sbin/lsmod | grep $m >/dev/null 2>&1 ; then
  137 + echo "$m module loaded."
  138 + OnePlusLoaded=1
  139 + elif [ -d "/sys/module/$m" ]; then
  140 + echo "$m module in kernel."
  141 + OnePlusLoaded=1
  142 + elif [ "$m" == "ipmi_msghandler" ]; then
  143 + if [ -d "/sys/module/ipmi_si" ]; then
  144 + echo "$m module in kernel."
  145 + OnePlusLoaded=1
  146 + else
  147 + OnePlusUnloaded=1
  148 + fi
  149 + else
  150 + echo "$m module not loaded."
  151 + OnePlusUnloaded=1
  152 + fi
  153 + done
  154 +}
  155 +
  156 +modules_loaded()
  157 +{
  158 + OnePlusLoaded=0
  159 + OnePlusUnloaded=0
  160 + for m in $@; do
  161 + if /sbin/lsmod | grep $m >/dev/null 2>&1 ; then
  162 + OnePlusLoaded=1
  163 + elif [ -d "/sys/module/$m" ]; then
  164 + OnePlusLoaded=1
  165 + elif [ "$m" == "ipmi_msghandler" ]; then
  166 + if [ -d "/sys/module/ipmi_si" ]; then
  167 + OnePlusLoaded=1
  168 + else
  169 + OnePlusUnloaded=1
  170 + fi
  171 + else
  172 + OnePlusUnloaded=1
  173 + fi
  174 + done
  175 +}
  176 +
  177 +modules_unloaded()
  178 +{
  179 + OnePlusLoaded=0
  180 + OnePlusUnloaded=0
  181 + for m in $@; do
  182 + if /sbin/lsmod | grep $m >/dev/null 2>&1 ; then
  183 + OnePlusLoaded=1
  184 + elif [ -d "/sys/module/$m" ]; then
  185 + OnePlusUnloaded=1
  186 + elif [ "$m" == "ipmi_msghandler" ]; then
  187 + if [ -d "/sys/module/ipmi_si" ]; then
  188 + OnePlusUnloaded=1 # XXX: compiled in kernel
  189 + else
  190 + OnePlusUnloaded=1
  191 + fi
  192 + else
  193 + OnePlusUnloaded=1
  194 + fi
  195 + done
  196 +}
  197 +
  198 +device_node_exists ()
  199 +{
  200 + if [ -e "$1" ]; then
  201 + echo "$1 exists."
  202 + return 1
  203 + fi
  204 + echo "$1 does not exist."
  205 + return 0
  206 +}
  207 +
  208 +minimum_modules_loaded()
  209 +{
  210 + rc_base=1
  211 + rc_hw=1
  212 + modules_loaded_verbose "${MODULES_BASE}"
  213 + [ ${OnePlusLoaded} -eq 0 ] && rc_base=0
  214 +
  215 + modules_loaded_verbose "${MODULES_HW}"
  216 + [ ${OnePlusLoaded} -eq 0 ] && rc_hw=0
  217 +
  218 + return $((rc_base && rc_hw))
  219 +}
  220 +
  221 +#############################################################################
  222 +
  223 +load_si()
  224 +{
  225 + if [ "${IPMI_SI}" = "yes" ]; then
  226 + modprobe ${IPMI_SI_MODULE_NAME} > /dev/null 2>&1
  227 + modules_loaded ${IPMI_SI_MODULE_NAME}
  228 + [ ${OnePlusLoaded} -ne 1 ] && RETVAL=$((RETVAL | 1))
  229 + fi
  230 +}
  231 +
  232 +load_smb()
  233 +{
  234 + if [ "${IPMI_SMB}" = "yes" ]; then
  235 + modprobe ${IPMI_SMB_MODULE_NAME} > /dev/null 2>&1
  236 + modules_loaded ${IPMI_SMB_MODULE_NAME}
  237 + [ ${OnePlusLoaded} -ne 1 ] && RETVAL=$((RETVAL | 1))
  238 + fi
  239 +}
  240 +
  241 +load_hw_modules()
  242 +{
  243 + load_si
  244 + load_smb
  245 +}
  246 +
  247 +start_watchdog_common()
  248 +{
  249 + load_hw_modules
  250 + modprobe ipmi_watchdog ${IPMI_WATCHDOG_OPTIONS} > /dev/null 2>&1
  251 + modules_loaded ipmi_watchdog
  252 + [ ${OnePlusUnloaded} -ne 0 ] &&
  253 + RETVAL=$((RETVAL | 2)) &&
  254 + log_failure_msg &&
  255 + return
  256 + if [ ${UDEV_EXISTS} -eq 0 -a ! -e /dev/watchdog ]; then
  257 + mknod -m 0600 /dev/watchdog c 10 130
  258 + [ $? -ne 0 ] &&
  259 + RETVAL=$((RETVAL | 8)) &&
  260 + log_failure_msg &&
  261 + return
  262 + fi
  263 + log_success_msg
  264 +}
  265 +
  266 +start_watchdog_quiet()
  267 +{
  268 + [ "${IPMI_WATCHDOG}" != "yes" ] &&
  269 + return
  270 + echo -n $"Starting ipmi_watchdog driver: "
  271 + start_watchdog_common
  272 +}
  273 +
  274 +start_watchdog()
  275 +{
  276 + echo -n $"Starting ipmi_watchdog driver: "
  277 + [ "${IPMI_WATCHDOG}" != "yes" ] &&
  278 + RETVAL=$((RETVAL | 2)) &&
  279 + log_failure_msg "not configured" &&
  280 + return
  281 + start_watchdog_common
  282 +}
  283 +
  284 +stop_watchdog()
  285 +{
  286 + echo -n $"Stopping ipmi_watchdog driver: "
  287 + modprobe -q -r ipmi_watchdog > /dev/null 2>&1
  288 + modules_loaded ipmi_watchdog
  289 + if [ ${OnePlusLoaded} -ne 0 ]; then
  290 + RETVAL=$((RETVAL | 32))
  291 + log_failure_msg
  292 + else
  293 + if [ "${IPMI_WATCHDOG}" = "yes" ]; then
  294 + [ ${UDEV_EXISTS} -eq 0 ] && rm -f /dev/watchdog
  295 + fi
  296 + log_success_msg
  297 + fi
  298 +}
  299 +
  300 +stop_watchdog_quiet()
  301 +{
  302 + modprobe -q -r ipmi_watchdog > /dev/null 2>&1
  303 + modules_loaded ipmi_watchdog
  304 + if [ ${OnePlusLoaded} -ne 0 ]; then
  305 + RETVAL=$((RETVAL | 32))
  306 + else
  307 + if [ "${IPMI_WATCHDOG}" = "yes" ]; then
  308 + [ ${UDEV_EXISTS} -eq 0 ] && rm -f /dev/watchdog
  309 + fi
  310 + fi
  311 +}
  312 +
  313 +start_powercontrol_common()
  314 +{
  315 + local poweroff_opts=""
  316 + load_hw_modules
  317 + if [ "${IPMI_POWERCYCLE}" == "yes" ]; then
  318 + modinfo ipmi_poweroff 2>/dev/null | grep poweroff_control > /dev/null 2>&1 && \
  319 + poweroff_opts="poweroff_control=2"
  320 + modinfo ipmi_poweroff 2>/dev/null | grep poweroff_powercycle > /dev/null 2>&1 && \
  321 + poweroff_opts="poweroff_powercycle=1"
  322 + fi
  323 + modprobe ipmi_poweroff "${poweroff_opts}" > /dev/null 2>&1
  324 + modules_loaded ipmi_poweroff
  325 + [ ${OnePlusUnloaded} -ne 0 ] &&
  326 + RETVAL=$((RETVAL | 2)) &&
  327 + log_failure_msg &&
  328 + return
  329 + log_success_msg
  330 +}
  331 +
  332 +start_powercontrol_quiet()
  333 +{
  334 + [ "${IPMI_POWEROFF}" != "yes" ] &&
  335 + return
  336 + echo -n $"Starting ipmi_poweroff driver: "
  337 + start_powercontrol_common
  338 +}
  339 +
  340 +start_powercontrol()
  341 +{
  342 + echo -n $"Starting ipmi_poweroff driver: "
  343 + [ "${IPMI_POWEROFF}" != "yes" ] &&
  344 + RETVAL=$((RETVAL | 2)) &&
  345 + log_failure_msg "not configured" &&
  346 + return
  347 + start_powercontrol_common
  348 +}
  349 +
  350 +stop_powercontrol()
  351 +{
  352 + echo -n $"Stopping ipmi_poweroff driver: "
  353 + modprobe -q -r ipmi_poweroff > /dev/null 2>&1
  354 + modules_loaded ipmi_poweroff
  355 + if [ ${OnePlusLoaded} -ne 0 ]; then
  356 + RETVAL=$((RETVAL | 32))
  357 + log_failure_msg
  358 + else
  359 + log_success_msg
  360 + fi
  361 +}
  362 +
  363 +stop_powercontrol_quiet()
  364 +{
  365 + modprobe -q -r ipmi_poweroff > /dev/null 2>&1
  366 + modules_loaded ipmi_poweroff
  367 + [ ${OnePlusLoaded} -ne 0 ] && RETVAL=$((RETVAL | 32))
  368 +}
  369 +
  370 +#############################################################################
  371 +unload_all_ipmi_modules()
  372 +{
  373 + stop_watchdog_quiet
  374 + stop_powercontrol_quiet
  375 + for m in ${MODULES}; do
  376 + modprobe -q -r ${m} > /dev/null 2>&1
  377 + done
  378 + # delete interface node ONLY if ipmi_devintf is unloaded
  379 + [ `lsmod | grep -c "ipmi_devintf"` -eq 0 ] &&
  380 + rm -f "/dev/ipmi${INTF_NUM}"
  381 +}
  382 +
  383 +unload_ipmi_modules_leave_features()
  384 +{
  385 + for m in ${MODULES_INTERFACES}; do
  386 + modprobe -q -r ${m} > /dev/null 2>&1
  387 + done
  388 + # delete interface node ONLY if ipmi_devintf is unloaded
  389 + [ `lsmod | grep -c "ipmi_devintf"` -eq 0 ] &&
  390 + rm -f "/dev/ipmi${INTF_NUM}"
  391 + lsmod | egrep -q "ipmi_(poweroff|watchdog)" > /dev/null 2>&1
  392 + if [ "$?" -ne "0" ]; then
  393 + stop_watchdog_quiet
  394 + stop_powercontrol_quiet
  395 + for m in ${MODULES}; do
  396 + modprobe -q -r ${m} > /dev/null 2>&1
  397 + done
  398 + fi
  399 +}
  400 +
  401 +#############################################################################
  402 +load_ipmi_modules ()
  403 +{
  404 + local locdelay
  405 + modprobe ipmi_msghandler > /dev/null 2>&1
  406 + modules_loaded ipmi_msghandler
  407 + [ ${OnePlusLoaded} -ne 1 ] && unload_all_ipmi_modules && RETVAL=$((RETVAL | 1)) && return
  408 + load_hw_modules
  409 + [ $((RETVAL & 1)) -eq 1 ] && unload_all_ipmi_modules && RETVAL=$((RETVAL | 1)) && return
  410 +
  411 + if [ "${DEV_IPMI}" = "yes" ]; then
  412 + modprobe ipmi_devintf > /dev/null 2>&1
  413 + modules_loaded ipmi_devintf
  414 + RETVAL=$((RETVAL & ~2))
  415 + [ ${OnePlusLoaded} -eq 0 ] && RETVAL=$((RETVAL | 2))
  416 + if [ ${OnePlusLoaded} -eq 1 ]; then
  417 + if [ ${UDEV_EXISTS} -eq 0 ]; then
  418 + DEVMAJOR=`cat /proc/devices | awk '/ipmidev/{print $1}'`
  419 + rm -f /dev/ipmi${INTF_NUM}
  420 + mknod -m 0600 /dev/ipmi${INTF_NUM} c ${DEVMAJOR} 0 || RETVAL=$((RETVAL | 4))
  421 + fi
  422 +
  423 + # udev can take several seconds to create /dev/ipmi0,
  424 + # but it happens asynchronously, so delay here
  425 + locdelay=${DEV_IPMI_TIMEOUT}
  426 + while [ ! -e /dev/ipmi${INTF_NUM} -a ${locdelay} -gt 0 ]; do
  427 + locdelay=$((locdelay - 1))
  428 + sleep 1
  429 + done
  430 + fi
  431 + fi
  432 +
  433 + if [ "${IPMI_IMB}" = "yes" ]; then
  434 + modprobe ipmi_imb > /dev/null 2>&1
  435 + modules_loaded ipmi_imb
  436 + RETVAL=$((RETVAL & ~2))
  437 + [ ${OnePlusLoaded} -eq 0 ] && RETVAL=$((RETVAL | 2))
  438 + if [ ${OnePlusLoaded} -eq 1 ]; then
  439 + DEVMAJOR=`cat /proc/devices | awk '/imb/{print $1}'`
  440 + rm -f /dev/imb
  441 + mknod -m 0600 /dev/imb c ${DEVMAJOR} 0 || RETVAL=$((RETVAL | 4))
  442 + fi
  443 + fi
  444 +
  445 + # Per Corey Minyard, essentially no one uses ipmi_radisys
  446 + # and we don't want to encourage its further use
  447 + # so it won't be handled here.
  448 + return
  449 +}
  450 +
  451 +#############################################################################
  452 +start()
  453 +{
  454 + echo -n "Starting ${MODULE_NAME} drivers: "
  455 + load_ipmi_modules
  456 + if [ ${RETVAL} -eq 0 ]; then
  457 + touch ${LOCKFILE} && log_success_msg
  458 + else
  459 + if [ $((RETVAL & 1)) -eq 1 ]; then
  460 + log_failure_msg
  461 + else
  462 + touch ${LOCKFILE} && log_warning_msg
  463 + fi
  464 + fi
  465 + start_watchdog_quiet
  466 + start_powercontrol_quiet
  467 +}
  468 +
  469 +#############################################################################
  470 +stop()
  471 +{
  472 + echo -n "Stopping ${MODULE_NAME} drivers: "
  473 + unload_ipmi_modules_leave_features
  474 + modules_loaded ${MODULES_INTERFACES}
  475 + if [ ${OnePlusLoaded} -ne 0 ]; then
  476 + RETVAL=$((RETVAL | 32))
  477 + log_failure_msg "may be in use"
  478 + else
  479 + rm -f ${LOCKFILE}
  480 + log_success_msg
  481 + fi
  482 +}
  483 +
  484 +stop_all()
  485 +{
  486 + echo -n $"Stopping all ${MODULE_NAME} drivers: "
  487 + unload_all_ipmi_modules
  488 + modules_loaded ${MODULES}
  489 + if [ ${OnePlusLoaded} -ne 0 ]; then
  490 + RETVAL=$((RETVAL | 32))
  491 + log_failure_msg "may be in use"
  492 + else
  493 + rm -f ${LOCKFILE}
  494 + log_success_msg
  495 + fi
  496 +}
  497 +
  498 +#############################################################################
  499 +restart()
  500 +{
  501 + stop_all
  502 + RETVAL=0
  503 + start
  504 +}
  505 +
  506 +#############################################################################
  507 +
  508 +reload()
  509 +{
  510 + stop_all
  511 + RETVAL=0
  512 + start
  513 +}
  514 +
  515 +#############################################################################
  516 +
  517 +status_all()
  518 +{
  519 + minimum_modules_loaded
  520 + [ $? -eq 0 ] && RETVAL=$((RETVAL | 1))
  521 +
  522 + modules_loaded_verbose ${MODULES_FEATURES} ${MODULES_INTERFACES}
  523 + [ ${OnePlusUnloaded} -ne 0 ] && RETVAL=$((RETVAL | 2))
  524 +
  525 + if [ "${DEV_IPMI}" = "yes" ]; then
  526 + device_node_exists /dev/ipmi${INTF_NUM}
  527 + [ $? -eq 0 ] && RETVAL=$((RETVAL | 4))
  528 + fi
  529 +
  530 + if [ "${IPMI_IMB}" = "yes" ]; then
  531 + device_node_exists /dev/imb
  532 + [ $? -eq 0 ] && RETVAL=$((RETVAL | 4))
  533 + fi
  534 +
  535 + if [ "${IPMI_WATCHDOG}" = "yes" ]; then
  536 + device_node_exists /dev/watchdog
  537 + [ $? -eq 0 ] && RETVAL=$((RETVAL | 8))
  538 + fi
  539 +
  540 + [ ! -e ${LOCKFILE} ] && RETVAL=$((RETVAL | 16))
  541 +}
  542 +
  543 +status()
  544 +{
  545 + minimum_modules_loaded
  546 + [ $? -eq 0 ] && RETVAL=$((RETVAL | 1))
  547 +
  548 + if [ "${DEV_IPMI}" = "yes" ]; then
  549 + modules_loaded_verbose ipmi_devintf
  550 + [ ${OnePlusLoaded} -eq 0 ] && RETVAL=$((RETVAL | 2))
  551 +
  552 + device_node_exists /dev/ipmi${INTF_NUM}
  553 + [ $? -eq 0 ] && RETVAL=$((RETVAL | 4))
  554 + fi
  555 +
  556 + if [ "${IPMI_IMB}" = "yes" ]; then
  557 + device_node_exists /dev/imb
  558 + [ $? -eq 0 ] && RETVAL=$((RETVAL | 4))
  559 + fi
  560 +}
  561 +
  562 +status_watchdog()
  563 +{
  564 + minimum_modules_loaded
  565 + [ $? -eq 0 ] && RETVAL=$((RETVAL | 1))
  566 +
  567 + modules_loaded_verbose ipmi_watchdog
  568 + [ ${OnePlusLoaded} -eq 0 ] && RETVAL=$((RETVAL | 2))
  569 +
  570 + device_node_exists /dev/watchdog
  571 + [ $? -eq 0 ] && RETVAL=$((RETVAL | 8))
  572 +}
  573 +
  574 +status_powercontrol()
  575 +{
  576 + minimum_modules_loaded
  577 + [ $? -eq 0 ] && RETVAL=$((RETVAL | 1))
  578 +
  579 + modules_loaded_verbose ipmi_powercontrol
  580 + [ ${OnePlusLoaded} -eq 0 ] && RETVAL=$((RETVAL | 2))
  581 +}
  582 +
  583 +#############################################################################
  584 +usage ()
  585 +{
  586 + echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart" 1>&2
  587 + echo $" start-watchdog|stop-watchdog|status-watchdog" 1>&2
  588 + echo $" start-powercontrol|stop-powercontrol|status-powercontrol" 1>&2
  589 + echo $" stop-all|status-all}" 1>&2
  590 + echo $"" 1>&2
  591 + echo $"CAUTION: Please do not use this when ipmi or openipmi init is present." 1>&2
  592 + echo $"" 1>&2
  593 + RETVAL=1
  594 +}
  595 +
  596 +condrestart ()
  597 +{
  598 + [ -e ${LOCKFILE} ] && restart
  599 +}
  600 +
  601 +#############################################################################
  602 +# MAIN
  603 +#############################################################################
  604 +case "$1" in
  605 + start) start ;;
  606 + stop) stop ;;
  607 + restart) restart ;;
  608 + force-reload) reload ;;
  609 + reload) reload ;;
  610 + status) status ;;
  611 + status-all) status_all ;;
  612 + condrestart) condrestart ;;
  613 + try-restart) condrestart ;;
  614 + start-watchdog) start_watchdog ;;
  615 + stop-watchdog) stop_watchdog ;;
  616 + status-watchdog) status_watchdog ;;
  617 + start-powercontrol) start_powercontrol ;;
  618 + stop-powercontrol) stop_powercontrol ;;
  619 + status-powercontrol) status_powercontrol ;;
  620 + stop-all) stop_all ;;
  621 + *) usage ;;
  622 +esac
  623 +
  624 +exit ${RETVAL}
  625 +
  626 +#############################################################################
  627 +# end of file
  628 +#############################################################################
  629 +
22 manifests/openmanage/redhat.pp
@@ -52,4 +52,26 @@
52 52 ensure => absent,
53 53 }
54 54
  55 + # Patch for RHEL6.4, waiting for new OMSA release
  56 + # See http://lists.us.dell.com/pipermail/linux-poweredge/2013-March/047794.html
  57 + # This file is a kind a merge between /etc/init.d/ipmi (provided by OpenIPMI)
  58 + # and /etc/init.d/dsm_sa_ipmi (provided by OMSA 7.2)
  59 + case $::lsbdistrelease {
  60 +
  61 + '6.4': {
  62 + file { '/etc/init.d/dsm_sa_ipmi':
  63 + ensure => present,
  64 + source => "puppet:///modules/dell/etc/init.d/dsm_sa_ipmi.${::osfamily}.${::lsbdistrelease}",
  65 + mode => '0755',
  66 + seluser => 'system_u',
  67 + selrole => 'object_r',
  68 + seltype => 'initrc_exec_t',
  69 + before => [ Service['dataeng'] ],
  70 + }
  71 + }
  72 +
  73 + default: {}
  74 +
  75 + }
  76 +
55 77 }

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.