(file) Return to tog-pegasus.rc CVS log (file) (dir) Up to [Pegasus] / pegasus / rpm

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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2