1 w.otsuka 1.1 #! /bin/sh
2 #%/////////////////////////////////////////////////////////////////////////////
3 #
4 # Copyright (c) 2004 BMC Software, Hewlett-Packard Company, IBM,
5 # The Open Group, Tivoli Systems
6 #
7 # Permission is hereby granted, free of charge, to any person obtaining a copy
8 # of this software and associated documentation files (the "Software"), to
9 # deal in the Software without restriction, including without limitation the
10 # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
11 # sell copies of the Software, and to permit persons to whom the Software is
12 # furnished to do so, subject to the following conditions:
13 #
14 # THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
15 # ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
16 # "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
17 # LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
18 # PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19 # HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 # ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 w.otsuka 1.1 #
23 #==============================================================================
24 #
25 #%/////////////////////////////////////////////////////////////////////////////
26
27 ### BEGIN INIT INFO
28 # Provides: tog-pegasus
29 # Required-Start: $syslog $network
30 # Should-Start: $time
31 # Required-Stop: $syslog
32 # Default-Start: 3 5
33 # Default-Stop: 0 1 2 6
34 # Description: init script for Pegasus CIMServer
35 ### END INIT INFO
36
37 CIMSERVER_BIN=/opt/tog-pegasus/sbin/cimserver
38 prog=cimserver
39
40 test -x $CIMSERVER_BIN || exit 5
41
42 . /lib/lsb/init-functions
43 w.otsuka 1.1 RETVAL=0
44
45 case "$1" in
46 start)
47 echo -n $"Starting up Pegasus CIMOM daemon: "
48 start_daemon $CIMSERVER_BIN
49 RETVAL=$?
50 [ "$RETVAL" -eq 0 ] && log_success_msg $"$prog start" || log_failure_msg $"$prog start"
51 echo
52 ;;
53
54 stop)
55 echo -n $"Shutting down Pegasus CIMOM daemon: "
56 kill_proc cimserver
57 RETVAL=$?
58 [ "$RETVAL" -eq 0 ] && log_success_msg $"$prog stop" || log_failure_msg $"$prog stop"
59 echo
60 ;;
61 status)
62 status $CIMSERVER_BIN
63 RETVAL=$?
64 w.otsuka 1.1 ;;
65 try-restart)
66 $0 stop && $0 start
67 ;;
68 restart|force-reload)
69 $0 stop
70 $0 start
71 ;;
72 reload)
73 ;;
74 *)
75 echo "Usage: $0 {start|stop|status|restart|reload|force-reload|try-restart}"
76 exit 1
77 esac
78
79 exit $RETVAL
80
|