File ganglia-monitor-core-2.5.7-init.dif of Package ganglia-monitor-core

--- gmetad/gmetad.init
+++ gmetad/gmetad.init
@@ -4,43 +4,53 @@
 # chkconfig: 2345 20 80
 # description: gmetad startup script
 #
+### BEGIN INIT INFO
+# Provides:          gmetad
+# Required-Start:    $syslog $remote_fs
+# Should-Start: $time ypbind sendmail
+# Required-Stop:     $syslog $remote_fs
+# Should-Stop: $time ypbind sendmail
+# Default-Start:     3 5
+# Default-Stop:      0 1 2 6
+# Short-Description: Ganglia gmetad startup script
+# Description:       Ganglia gmetad startup script
+### END INIT INFO
+
 GMETAD=/usr/sbin/gmetad
 
-. /etc/rc.d/init.d/functions
 
-RETVAL=0
+. /etc/rc.status
+
+# Reset status of this service
+rc_reset
 
 case "$1" in
    start)
       echo -n "Starting GANGLIA gmetad: "
       [ -f $GMETAD ] || exit 1
 
-      daemon $GMETAD
-      RETVAL=$?
-      echo
-      [ $RETVAL -eq 0 ] && touch /var/lock/subsys/gmetad
+      startproc $GMETAD
+	  rc_status -v
       ;;
 
   stop)
       echo -n "Shutting down GANGLIA gmetad: "
-      killproc gmetad
-      RETVAL=$?
-      echo
-      [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/gmetad
+      killproc $GMETAD
+	  rc_status -v
       ;;
 
   restart|reload)
       $0 stop
       $0 start
-      RETVAL=$?
       ;;
   status)
-      status gmetad
+      checkproc $GMETAD
       RETVAL=$?
+	  rc_status -v
       ;;
   *)
       echo "Usage: $0 {start|stop|restart|status}"
       exit 1
 esac
 
-exit $RETVAL
+rc_exit
--- gmond/gmond.init
+++ gmond/gmond.init
@@ -4,39 +4,47 @@
 # chkconfig: 2345 70 40
 # description: gmond startup script
 #
+### BEGIN INIT INFO
+# Provides:          gmond
+# Required-Start:    $syslog $remote_fs
+# Should-Start: $time ypbind sendmail
+# Required-Stop:     $syslog $remote_fs
+# Should-Stop: $time ypbind sendmail
+# Default-Start:     3 5
+# Default-Stop:      0 1 2 6
+# Short-Description: Ganglia gmond startup script
+# Description:       Ganglia gmond startup script
+### END INIT INFO
 GMOND=/usr/sbin/gmond
 
-. /etc/rc.d/init.d/functions
+. /etc/rc.status
 
 RETVAL=0
+# Reset status of this service
+rc_reset
 
 case "$1" in
    start)
-      echo -n "Starting GANGLIA gmond: "
+      echo -n "Starting GANGLIA gmond"
       [ -f $GMOND ] || exit 1
 
-      daemon $GMOND
-      RETVAL=$?
-      echo
-      [ $RETVAL -eq 0 ] && touch /var/lock/subsys/gmond
+      startproc $GMOND
+	  rc_status -v
 	;;
 
   stop)
-      echo -n "Shutting down GANGLIA gmond: "
-      killproc gmond
-      RETVAL=$?
-      echo
-      [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/gmond
+      echo -n "Shutting down GANGLIA gmond"
+      killproc $GMOND
+	  rc_status -v
 	;;
 
-  restart|reload)
+  restart)
    	$0 stop
    	$0 start
-   	RETVAL=$?
 	;;
   status)
-   	status gmond
-   	RETVAL=$?
+   	checkproc $GMOND
+	  rc_status -v
 	;;
   *)
 	echo "Usage: $0 {start|stop|restart|status}"
openSUSE Build Service is sponsored by