From: Matthijs Kooijman Date: Tue, 17 Jun 2008 20:31:00 +0000 (+0200) Subject: * Add initial hpasm init script. X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=82416d60850cb0855431d4be0af29aa2a76318c3;p=matthijs%2Fservers%2Fdrsnuggles.git * Add initial hpasm init script. --- diff --git a/etc/init.d/hpasm b/etc/init.d/hpasm new file mode 100755 index 0000000..cd7423d --- /dev/null +++ b/etc/init.d/hpasm @@ -0,0 +1,58 @@ +#!/bin/bash + +# Copyright 2002 hp Information Technologies Group, L.P. +# +# See "man chkconfig" for information on next two lines (Red Hat only) +# chkconfig: - 2345 91 1 +# description: HP Advanced System Management Drivers and Agents for Linux +# +# +# Following lines are in conformance with LSB 1.2 spec +### BEGIN INIT INFO +# Provides: hpasm +# Required-Start: snmp +# Required-Stop: hprsm cmanic cmastor +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Description: starts hpasm (HP Advanced System Management Drivers and Agents) +### END INIT INFO + +RETVAL=0 +SCRIPT=/opt/compaq/hpasm/etc/hpasm + +ACTION=$1 +shift +ADDARGS=$* + +# See how we were called. +case "$ACTION" in + start) + $SCRIPT start $ADDARGS + ;; + stop) + $SCRIPT stop $ADDARGS + ;; + restart) + $SCRIPT stop $ADDARGS + $SCRIPT start $ADDARGS + ;; + status) + $SCRIPT status $ADDARGS + ;; + configure) + $SCRIPT configure $ADDARGS + ;; + reconfigure) + $SCRIPT reconfigure $ADDARGS + ;; + unconfigure) + $SCRIPT unconfigure $ADDARGS + ;; + *) + # do not advertise unreasonable commands that there is no reason + # to use with this device + echo "Usage: hpasm {start|stop|status|restart|configure|unconfigure|reconfigure}" + exit 1 +esac + +exit 0