Author: glen                         Date: Thu Apr 20 17:56:07 2006 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- use %service, add chkconfig deps, add missing %preun

---- Files affected:
SPECS:
   upsmonitor.spec (1.7 -> 1.8) 

---- Diffs:

================================================================
Index: SPECS/upsmonitor.spec
diff -u SPECS/upsmonitor.spec:1.7 SPECS/upsmonitor.spec:1.8
--- SPECS/upsmonitor.spec:1.7   Sun Mar 27 12:45:09 2005
+++ SPECS/upsmonitor.spec       Thu Apr 20 19:56:02 2006
@@ -5,16 +5,18 @@
 Version:       1.0.11
 Release:       1
 License:       Free
-Vendor:                Artur Miarecki (MAYANET) [EMAIL PROTECTED]
 Group:         Daemons
-Requires:      /bin/mail
 Source0:       
http://download.mayanet.pl/ups_monitor/arch/%{version}/%{name}.pl
 Source1:       
http://download.mayanet.pl/ups_monitor/arch/%{version}/%{name}.conf
 Source2:       http://download.mayanet.pl/ups_monitor/historia.txt
-Source10:      %{name}-readme.txt
 # http://download.mayanet.pl/ups_monitor/readme.txt
+Source10:      %{name}-readme.txt
 Source11:      %{name}.init
 URL:           http://download.mayanet.pl/ups_monitor/
+BuildRequires: rpmbuild(macros) >= 1.268
+Requires(post,preun):  /sbin/chkconfig
+Requires:      /bin/mail
+Requires:      rc-scripts
 ExclusiveArch: %{ix86}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -43,10 +45,12 @@
 
 %post
 /sbin/chkconfig --add upsmonitor
-if [ -f /var/lock/subsys/upsmonitor ]; then
-       /etc/rc.d/init.d/upsmonitor restart 1>&2
-else
-       echo "Run \"/etc/rc.d/init.d/upsmoinitor start\" to start ups_monitor."
+%service upsmonitor restart "ups_monitor"
+
+%preun
+if [ "$1" = "0" ]; then
+       %service upsmonitor stop
+       /sbin/chkconfig --del upsmonitor
 fi
 
 %files
@@ -62,6 +66,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.8  2006/04/20 17:56:02  glen
+- use %service, add chkconfig deps, add missing %preun
+
 Revision 1.7  2005/03/27 10:45:09  paszczus
 - updated to 1.0.11
 
================================================================

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

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to