From a710a7604bd9335270a40c75733e57b8ded68fa0 Mon Sep 17 00:00:00 2001 From: pbern Date: Sun, 10 Oct 2004 11:39:34 +0000 Subject: [PATCH] - fix Changed files: fnfx.spec -> 1.3 --- fnfx.spec | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/fnfx.spec b/fnfx.spec index d91749d..2efcab5 100644 --- 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) -- 2.44.0