* Add initial hpasm init script.
[matthijs/servers/drsnuggles.git] / etc / init.d / hpasm
1 #!/bin/bash
2
3 # Copyright 2002 hp Information Technologies Group, L.P.
4 #
5 # See "man chkconfig" for information on next two lines (Red Hat only)
6 # chkconfig: - 2345 91 1
7 # description: HP Advanced System Management Drivers and Agents for Linux
8 #
9 #
10 # Following lines are in conformance with LSB 1.2 spec
11 ### BEGIN INIT INFO
12 # Provides:            hpasm
13 # Required-Start:      snmp
14 # Required-Stop:       hprsm cmanic cmastor
15 # Default-Start:       2 3 4 5
16 # Default-Stop:        0 1 6
17 # Description:         starts hpasm (HP Advanced System Management Drivers and Agents)
18 ### END INIT INFO
19
20 RETVAL=0
21 SCRIPT=/opt/compaq/hpasm/etc/hpasm
22
23 ACTION=$1
24 shift
25 ADDARGS=$*
26
27 # See how we were called.
28 case "$ACTION" in
29   start)
30         $SCRIPT start $ADDARGS
31         ;;
32   stop)
33         $SCRIPT stop $ADDARGS
34         ;;
35   restart)
36         $SCRIPT stop $ADDARGS
37         $SCRIPT start $ADDARGS
38         ;;
39   status)
40         $SCRIPT status $ADDARGS
41         ;;
42   configure)
43         $SCRIPT configure $ADDARGS 
44         ;;
45   reconfigure)
46         $SCRIPT reconfigure $ADDARGS 
47         ;;
48   unconfigure)
49         $SCRIPT unconfigure $ADDARGS 
50         ;;
51   *)
52         # do not advertise unreasonable commands that there is no reason
53         # to use with this device
54         echo "Usage: hpasm {start|stop|status|restart|configure|unconfigure|reconfigure}"
55         exit 1
56 esac
57
58 exit 0