rpms/hddtemp/devel hddtemp.init,1.2,1.3 hddtemp.spec,1.20,1.21

Ville Skytta (scop) fedora-extras-commits at redhat.com
Mon Jul 9 21:14:06 UTC 2007


Author: scop

Update of /cvs/pkgs/rpms/hddtemp/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26134

Modified Files:
	hddtemp.init hddtemp.spec 
Log Message:
* Tue Jul 10 2007 Ville Skyttä <ville.skytta at iki.fi> - 0.3-0.12.beta15
- Improve init script LSB compliance.



Index: hddtemp.init
===================================================================
RCS file: /cvs/pkgs/rpms/hddtemp/devel/hddtemp.init,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- hddtemp.init	4 Dec 2004 22:43:31 -0000	1.2
+++ hddtemp.init	9 Jul 2007 21:13:32 -0000	1.3
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 #
 # hddtemp       This shell script takes care of starting and stopping hddtemp.
 #
@@ -7,17 +7,21 @@
 # processname:  hddtemp
 # config:       __ETCDIR__/sysconfig/hddtemp
 
+### BEGIN INIT INFO
+# Provides: hddtemp
+# Required-Start: $network
+# Required-Stop: $network
+# Should-Start: $syslog
+# Should-Stop: $syslog
+# Short-Description: Hard drive temperature monitor daemon
+# Description: Provides information about hard drives' temperatures.
+### END INIT INFO
+
 . __ETCDIR__/sysconfig/hddtemp
 
 # Source function library.
 . __INITDIR__/functions
 
-# Source networking configuration.
-. __ETCDIR__/sysconfig/network
-
-# Check that networking is up.
-[ "$NETWORKING" = "no" ] && exit 0
-
 # Backwards compatibility.
 [ -z "$HDDTEMP_OPTIONS" -a -n "$HDDTEMPARGS" ] && \
   HDDTEMP_OPTIONS="$HDDTEMPARGS"
@@ -28,10 +32,15 @@
 lockfile=__LOCKDIR__/subsys/$prog
 
 start() {
-    echo -n $"Starting hard disk temperature monitor daemon ($prog): "
-    daemon $exec -d $HDDTEMP_OPTIONS
-    retval=$?
-    echo
+    if [[ "$HDDTEMP_OPTIONS" != */dev/* ]] ; then
+        action $"Unconfigured: $prog, see__ETCDIR__/sysconfig/hddtemp: " /bin/false
+        retval=6
+    else
+        echo -n $"Starting hard disk temperature monitor daemon ($prog): "
+        daemon $exec -d $HDDTEMP_OPTIONS
+        retval=$?
+        echo
+    fi
     [ $retval -eq 0 ] && touch $lockfile
     return $retval
 }
@@ -55,16 +64,22 @@
     start|stop|restart)
         $1
         ;;
-    reload|force-reload)
+    force-reload)
         restart
         ;;
     status)
         status $prog
         ;;
     try-restart|condrestart)
-        [ ! -f $lockfile ] || restart
+        if status $prog >/dev/null ; then
+            restart
+        fi
+        ;;
+    reload)
+        action $"Service $prog does not support the reload action: " /bin/false
+        exit 3
         ;;
     *)
-        echo $"Usage: $0 {start|stop|status|restart|try-restart|reload|force-reload}"
+        echo $"Usage: $0 {start|stop|status|restart|try-restart|force-reload}"
         exit 2
 esac


Index: hddtemp.spec
===================================================================
RCS file: /cvs/pkgs/rpms/hddtemp/devel/hddtemp.spec,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- hddtemp.spec	9 Jan 2007 15:37:36 -0000	1.20
+++ hddtemp.spec	9 Jul 2007 21:13:32 -0000	1.21
@@ -2,7 +2,7 @@
 
 Name:           hddtemp
 Version:        0.3
-Release:        0.11.%{beta}%{?dist}
+Release:        0.12.%{beta}%{?dist}
 Summary:        Hard disk temperature tool
 
 Group:          Applications/System
@@ -95,6 +95,9 @@
 
 
 %changelog
+* Tue Jul 10 2007 Ville Skyttä <ville.skytta at iki.fi> - 0.3-0.12.beta15
+- Improve init script LSB compliance.
+
 * Tue Jan  9 2007 Ville Skyttä <ville.skytta at iki.fi> - 0.3-0.11.beta15
 - SATA sense fix (#221100, Jens Axboe).
 




More information about the fedora-extras-commits mailing list