5 # Required-Stop: hprsm cmanic cmastor
6 # Default-Start: 2 3 4 5
8 # Description: starts hpasmd (HP Advanced System Management Drivers and Agents)
11 # Author: Matthijs Kooijman <matthijs@stdin.nl>
12 # This file is mostly built from the skeleton, but with PIDFILE and VERBOSE
13 # stuff removed.. It starts hpasmd, without any extra crap or configs.
15 # Just hpasmd is enough to be able to use hpasmcli and hplog, to send ASR pings
16 # and to shutdown the system in case of thermal failure.
18 PATH=/sbin:/usr/sbin:/bin:/usr/bin
19 DESC="HP Advanced System Management Daemon"
21 DAEMON=/opt/compaq/hpasmd/bin/hpasmd
23 SCRIPTNAME=/etc/init.d/$NAME
25 # Exit if the package is not installed
26 [ -x "$DAEMON" ] || exit 0
28 # Read configuration variable file if it is present
29 [ -r /etc/default/$NAME ] && . /etc/default/$NAME
31 # Load the VERBOSE setting and other rcS variables
34 # Define LSB log_* functions.
35 # Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
36 . /lib/lsb/init-functions
39 # Function that starts the daemon/service
44 # 0 if daemon has been started
45 # 1 if daemon was already running
46 # 2 if daemon could not be started
47 start-stop-daemon --start --quiet --exec $DAEMON --test > /dev/null \
49 start-stop-daemon --start --quiet --exec $DAEMON -- $DAEMON_ARGS \
54 # Function that stops the daemon/service
59 # 0 if daemon has been stopped
60 # 1 if daemon was already stopped
61 # 2 if daemon could not be stopped
62 # other if a failure occurred
63 start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --name $NAME
70 log_daemon_msg "Starting $DESC" "$NAME"
78 log_daemon_msg "Stopping $DESC" "$NAME"
87 # If the "reload" option is implemented then remove the
88 # 'force-reload' alias
90 log_daemon_msg "Restarting $DESC" "$NAME"
97 1) log_end_msg 1 ;; # Old process is still running
98 *) log_end_msg 1 ;; # Failed to start
108 #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
109 echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2