rpms/gkrellm/EL-5 gkrellmd.init,1.1,1.2 gkrellm.spec,1.6,1.7

Ville Skytta (scop) fedora-extras-commits at redhat.com
Wed Sep 5 15:34:28 UTC 2007


Author: scop

Update of /cvs/pkgs/rpms/gkrellm/EL-5
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv8448

Modified Files:
	gkrellmd.init gkrellm.spec 
Log Message:
Resync with devel


Index: gkrellmd.init
===================================================================
RCS file: /cvs/pkgs/rpms/gkrellm/EL-5/gkrellmd.init,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- gkrellmd.init	19 Jul 2006 18:35:32 -0000	1.1
+++ gkrellmd.init	5 Sep 2007 15:33:56 -0000	1.2
@@ -6,53 +6,70 @@
 # processname: gkrellmd
 # config: /etc/gkrellmd.conf
 
+### BEGIN INIT INFO
+# Provides: gkrellmd
+# Required-Start: $network
+# Required-Stop: $network
+# Should-Start: hddtemp
+# Should-Stop: hddtemp
+# Short-Description: GNU Krell Monitors Server
+### END INIT INFO
+
 # source function library
 . /etc/rc.d/init.d/functions
 
-# Check that networking is up.
-[ "${NETWORKING}" = "no" ] && exit 0
-
-# The process must be configured first.
-[ -f /etc/gkrellmd.conf ] || exit 0
-
-RETVAL=0
-
-prog="gkrellmd"
+exec=/usr/sbin/gkrellmd
+prog=${exec##*/}
+lockfile=/var/lock/subsys/$prog
+
+start() {
+    if [ -f /etc/gkrellmd.conf ] ; then
+        echo -n $"Starting GNU Krell Monitors server ($prog): "
+        DISPLAY= daemon --user gkrellmd $exec -d
+        rv=$?
+        echo
+    else
+        action $"Unconfigured: $prog, /etc/gkrellmd.conf not found" /bin/false
+        rv=6
+    fi
+    [ $rv -eq 0 ] && touch $lockfile
+    return $rv
+}
+
+stop() {
+    echo -n $"Stopping GNU Krell Monitors server ($prog): "
+    killproc $prog
+    rv=$?
+    [ $rv -eq 0 ] && rm -f $lockfile
+    echo
+    return $rv
+}
+
+restart() {
+    stop
+    start
+}
 
 case "$1" in
-  start)
-	echo -n $"Starting $prog: "
-        daemon --user gkrellmd /usr/sbin/gkrellmd -d
-	RETVAL=$?
-	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/gkrellmd
-	echo
-	;;
-  stop)
-	echo -n $"Shutting down $prog: "
-	killproc gkrellmd
-	RETVAL=$?
-	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/gkrellmd
-	echo
-	;;
-  restart|reload|force-reload)
-        $0 stop
-        $0 start
-	RETVAL=$?
+    start|stop|restart)
+        $1
         ;;
-  condrestart|try-restart)
-        if [ -f /var/lock/subsys/gkrellmd ]; then
-                $0 stop
-		$0 start
+    force-reload)
+        restart
+        ;;
+    status)
+        status $prog
+        ;;
+    try-restart|condrestart)
+        if status $prog >/dev/null ; then
+            restart
         fi
-	RETVAL=$?
         ;;
-  status)
-        status gkrellmd
-	RETVAL=$?
+    reload)
+        action $"Service $prog does not support the reload action: " /bin/false
+        exit 3
         ;;
-  *)
-	echo $"Usage: $0 {start|stop|restart|reload|condrestart|status}"
-	exit 1
+    *)
+        echo $"Usage: $0 {start|stop|status|restart|try-restart|force-reload}"
+        exit 2
 esac
-
-exit $RETVAL


Index: gkrellm.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gkrellm/EL-5/gkrellm.spec,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- gkrellm.spec	4 Sep 2007 18:24:44 -0000	1.6
+++ gkrellm.spec	5 Sep 2007 15:33:56 -0000	1.7
@@ -1,6 +1,6 @@
 Name:           gkrellm
 Version:        2.3.0
-Release:        3%{?dist}
+Release:        4%{?dist}
 Summary:        Multiple stacked system monitors in one process
 Group:          Applications/System
 License:        GPLv3+
@@ -169,6 +169,10 @@
 
 
 %changelog
+* Wed Sep  5 2007 Ville Skyttä <ville.skytta at iki.fi> - 2.3.0-4
+- Rewrite gkrellmd init script: better LSB compliance, hddtemp
+  interoperability, avoidance of X error messages, general cleanup.
+
 * Tue Sep  4 2007 Ville Skyttä <ville.skytta at iki.fi> - 2.3.0-3
 - Fix gnutls detection/build and use it instead of openssl.
 - Sync user and group creation with current Fedora guidelines.




More information about the fedora-extras-commits mailing list