- Updated init.d script to look for cachefilesd in /sbin

- Added postun and preun rules so cachefilesd is stopped and started when
    the rpm is updated or removed.
This commit is contained in:
Steve Dickson 2006-08-08 21:43:24 +00:00
parent d319a0cc79
commit 9701e10ca6

View File

@ -1,6 +1,6 @@
Name: cachefilesd
Version: 0.4
Release: 2%{?dist}
Release: 3%{?dist}
Summary: CacheFiles userspace management daemon
Group: System Environment/Daemons
License: GPL
@ -12,6 +12,8 @@ BuildRequires: automake, autoconf
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/chkconfig
Patch1: cachefilesd-0.4-initscript.patch
%description
The cachefilesd daemon manages the caching files and directory that are
that are used by network filesystems such a AFS and NFS to
@ -20,6 +22,8 @@ do persistent caching to the local disk.
%prep
%setup -q
%patch1 -p1
%build
%ifarch s390 s390x
PIE="-fPIE"
@ -50,9 +54,15 @@ rm -rf $RPM_BUILD_ROOT
%preun
if [ $1 -eq 0 ]; then
/sbin/service cachefilesd stop
/sbin/chkconfig --del %{name}
fi
%postun
if [ "$1" -ge 1 ]; then
/sbin/service cachefilesd condrestart > /dev/null
fi
%files
%defattr(-,root,root)
@ -63,6 +73,11 @@ fi
%{_mandir}/*/*
%changelog
* Tue Aug 8 2006 Steve Dickson <steved@redhat.com> 0.4-3
- Updated init.d script to look for cachefilesd in /sbin
- Added postun and preun rules so cachefilesd is stopped
and started when the rpm is updated or removed.
* Tue Aug 7 2006 Jesse Keating <jkeating@redhat.com> 0.4-2
- require /sbin/chkconfig not /usr/bin/chkconfig