* Add initial hpasm init script.
authorMatthijs Kooijman <matthijs@drsnuggles.stderr.nl>
Tue, 17 Jun 2008 20:31:00 +0000 (22:31 +0200)
committerMatthijs Kooijman <matthijs@drsnuggles.stderr.nl>
Tue, 17 Jun 2008 20:31:00 +0000 (22:31 +0200)
etc/init.d/hpasm [new file with mode: 0755]

diff --git a/etc/init.d/hpasm b/etc/init.d/hpasm
new file mode 100755 (executable)
index 0000000..cd7423d
--- /dev/null
@@ -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