(file) Return to wbem22.lnx CVS log (file) (dir) Up to [Pegasus] / pegasus / rpm

  1 konrad.r 1.2 #! /bin/sh
  2              #%/////////////////////////////////////////////////////////////////////////////
  3              #
  4              # Copyright (c) 2003 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 konrad.r 1.2 #
 23              #==============================================================================
 24              #
 25              # Author: Konrad Rzeszutek <konradr@us.ibm.com>
 26              #
 27              # Modified By:
 28 konrad.r 1.4 #	10-28-2003: Martin Knipper <knipper@de.ibm.com>
 29              #		- Changed the chkconfig runlevel from 2345 to 3 and 5
 30              #		- Fixed a confusing output about syslog when you ask for the status on SuSE
 31              #		- The startproc command for stopping pegasus removed
 32 konrad.r 1.2 #
 33              #%/////////////////////////////////////////////////////////////////////////////
 34              #
 35              #
 36 konrad.r 1.4 # chkconfig: 35 26 74
 37 konrad.r 1.2 # description: Pegasus CIMOM enables a Linux System for WBEM (visit http://www.dmtf.org for
 38              # more information about CIM and WBEM). With appropriate instrumentation
 39              # Linux can provide systems management information or be managed by a remote
 40              # client application.
 41              # processname: cimserver 
 42              
 43              # Source function library.
 44              # /etc/init.d/pegasus-wbem
 45              #
 46              ### BEGIN INIT INFO
 47              # Provides: pegasus
 48              # Required-Start: $network
 49              # X-UnitedLinux-Should-Start: network
 50              # Required-Stop:  
 51              # Default-Start:  3 5
 52              # Default-Stop:
 53              # Description:    init script for Pegasus CIMServer
 54              ### END INIT INFO
 55              
 56              isUnited=`grep "UnitedLinux" /etc/issue`
 57 kumpf    1.5.6.1 isSUSE=`grep -i "SuSE" /etc/issue`
 58 konrad.r 1.2     
 59                  if [ "$isUnited" ] || [ "$isSUSE" ]; then
 60                  
 61                   . /etc/rc.status
 62                    rc_reset
 63                  
 64                    RETVAL=$rc_done
 65                  
 66                    case "$1" in
 67                      start)
 68                  	echo -n "Starting up Pegasus CIMOM daemon  "
 69 konrad.r 1.3     	startproc /usr/sbin/cimserver 
 70 konrad.r 1.2     	rc_status -v
 71                  	;;
 72                      stop)
 73 konrad.r 1.4     	echo -n "Shutting down Pegasus CIMOM daemon  "	
 74 konrad.r 1.5     	cimserver -s || killproc -TERM /usr/sbin/cimserver 
 75 konrad.r 1.2     	rc_status -v
 76                  	;;
 77                      try-restart)
 78                  	$0 stop && $0 start
 79                  	rc_status
 80                  	;;
 81                      restart)
 82                  	$0 stop
 83                  	$0 start
 84                  	rc_status
 85                  	;;
 86                      status)
 87 konrad.r 1.4     	echo -n "Checking for Pegasus CIMOM daemon:"
 88 konrad.r 1.2     	checkproc /usr/sbin/cimserver  ; rc_status -v
 89                  	;;
 90                      *)
 91                  	echo "Usage: $0 {start|stop|status|try-restart|restart}"
 92                  		exit 1
 93                  	;;
 94                     esac
 95                     rc_exit
 96                  else
 97                     . /etc/rc.d/init.d/functions
 98                     RETVAL=0
 99                  
100                     # Red Hat/Turbo/Caldera 
101                     case "$1" in
102                       start)
103                  	echo -n $"Starting up Pegasus CIMOM daemon: "
104 konrad.r 1.3     	daemon cimserver 
105 konrad.r 1.2     	RETVAL=$?
106                  	echo
107                  	;;
108                  
109                       stop)
110                  	echo -n $"Shutting down Pegasus CIMOM daemon: "
111                  	daemon cimserver -s
112                  	RETVAL=$?
113                  	echo
114                  	;;
115                       status) 
116                  	status cimserver
117                  	RETVAL=$?
118                  	;;
119                       restart|reload)
120                  	$0 stop && $0 start
121                  	;;
122                       *)
123                  	echo "Usage: $0 {start|stop|status|restart|reload}"
124                  	exit 1
125                     esac
126 konrad.r 1.2     
127                     exit $RETVAL
128                  
129                  fi

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2