]> git.pld-linux.org Git - packages/fnfx.git/commitdiff
- fix
authorpbern <pbern@pld-linux.org>
Sun, 10 Oct 2004 11:39:34 +0000 (11:39 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    fnfx.spec -> 1.3

fnfx.spec

index d91749d9411f6019f335d27afb176139c910bfa0..2efcab5691293dfc7c58cdcf15153cdc1526019f 100644 (file)
--- a/fnfx.spec
+++ b/fnfx.spec
@@ -9,8 +9,7 @@ Source0:        http://dl.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
 # Source0-md5: fb0b2a9d6c5446a4615d907a572fd541
 Source1:       %{name}.init
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-Requires(pre): rpm-helper
-Requires(post):        rpm-helper
+Requires(post,preun):   /sbin/chkconfig
 
 %description
 FnFX enables owners of Toshiba laptops to change the LCD brightness,
@@ -42,10 +41,20 @@ install %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/fnfx
 rm -rf $RPM_BUILD_ROOT
 
 %post
-%_post_service %{name}
+/sbin/chkconfig --add %{name}
+if [ -f /var/lock/subsys/%{name} ]; then
+        /etc/rc.d/init.d/%{name} restart >&2
+else
+        echo "Run \"/etc/rc.d/init.d/%{name} start\" to start %{name} daemon." >&2
+fi
 
 %preun
-%_preun_service %{name}
+if [ "$1" = "0" ]; then
+        if [ -f /var/lock/subsys/%{name} ]; then
+                /etc/rc.d/init.d/%{name} stop >&2
+        fi
+        /sbin/chkconfig --del %{name}
+fi
 
 %files
 %defattr(644,root,root,755)
This page took 0.075256 seconds and 4 git commands to generate.