SPECS: powernowd.spec - use %service, fix chkconfig deps

glen glen at pld-linux.org
Thu Apr 20 19:19:26 CEST 2006


Author: glen                         Date: Thu Apr 20 17:19:26 2006 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- use %service, fix chkconfig deps

---- Files affected:
SPECS:
   powernowd.spec (1.6 -> 1.7) 

---- Diffs:

================================================================
Index: SPECS/powernowd.spec
diff -u SPECS/powernowd.spec:1.6 SPECS/powernowd.spec:1.7
--- SPECS/powernowd.spec:1.6	Mon Jan  9 23:01:53 2006
+++ SPECS/powernowd.spec	Thu Apr 20 19:19:21 2006
@@ -11,6 +11,8 @@
 Source1:	%{name}.init
 Source2:	%{name}.sysconfig
 URL:		http://www.deater.net/john/powernowd.html
+Requires(post,preun):	/sbin/chkconfig
+Requires:	rc-scripts
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -39,17 +41,11 @@
 
 %post
 /sbin/chkconfig --add powernowd
-if [ -f /var/lock/subsys/powernowd ]; then
-	/etc/rc.d/init.d/powernowd restart >&2
-else
-	echo "Run \"/etc/rc.d/init.d/powernowd start\" to start powernowd daemon."
-fi
+%service powernowd restart "powernowd daemon"
 
 %preun
 if [ "$1" = "0" ]; then
-	if [ -f /var/lock/subsys/powernowd ]; then
-		/etc/rc.d/init.d/powernowd stop>&2
-	fi
+	%service powernowd stop
 	/sbin/chkconfig --del powernowd
 fi
 
@@ -66,6 +62,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.7  2006/04/20 17:19:21  glen
+- use %service, fix chkconfig deps
+
 Revision 1.6  2006/01/09 22:01:53  undefine
 - pldusers say, that it works.
 - release 1
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/powernowd.spec?r1=1.6&r2=1.7&f=u



More information about the pld-cvs-commit mailing list