rpms/zfs-fuse/devel zfs-fuse.init,1.7,1.8 zfs-fuse.spec,1.44,1.45
Uwe Kubosch
donv at fedoraproject.org
Sun Jul 4 21:16:15 UTC 2010
Author: donv
Update of /cvs/pkgs/rpms/zfs-fuse/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv4909
Modified Files:
zfs-fuse.init zfs-fuse.spec
Log Message:
* Cleanup of RPM spec and init script
Index: zfs-fuse.init
===================================================================
RCS file: /cvs/pkgs/rpms/zfs-fuse/devel/zfs-fuse.init,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -p -r1.7 -r1.8
--- zfs-fuse.init 31 Dec 2009 16:45:15 -0000 1.7
+++ zfs-fuse.init 4 Jul 2010 21:16:15 -0000 1.8
@@ -165,7 +165,6 @@ stop() {
echo_success
else
echo_warning
- exit 3
fi
echo
fi
@@ -173,9 +172,9 @@ stop() {
echo -n $"Stopping $prog: "
killproc $prog
kill_retval=$?
- echo
+ echo
- if [ "$PID" != "" ] ; then
+ if [ "$PID" != "" ] ; then
echo -n "Syncing disks again"
sync
echo_success
@@ -195,10 +194,14 @@ pool_status() {
status $prog && /usr/bin/zpool status
}
-status_quiet() {
+pool_status_quiet() {
pool_status >/dev/null 2>&1
}
+status_quiet() {
+ status $prog >/dev/null 2>&1
+}
+
case "$1" in
start)
status_quiet && exit 0
@@ -211,17 +214,16 @@ case "$1" in
restart
;;
reload)
- status_quiet || exit 7
- restart
+ restart
;;
force-reload)
- restart
+ restart
;;
status)
pool_status
;;
condrestart|try-restart)
- status_quiet || exit 0
+ pool_status_quiet || exit 0
restart
;;
*)
Index: zfs-fuse.spec
===================================================================
RCS file: /cvs/pkgs/rpms/zfs-fuse/devel/zfs-fuse.spec,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -p -r1.44 -r1.45
--- zfs-fuse.spec 4 Jul 2010 14:48:20 -0000 1.44
+++ zfs-fuse.spec 4 Jul 2010 21:16:15 -0000 1.45
@@ -1,6 +1,6 @@
Name: zfs-fuse
Version: 0.6.9
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: ZFS ported to Linux FUSE
Group: System Environment/Base
License: CDDL
@@ -72,7 +72,7 @@ scons debug=1
%install
%{__rm} -rf %{buildroot}
pushd src
-scons install install_dir=%{buildroot}%{_bindir} man_dir=%{buildroot}%{_mandir}/man8/ cfg_dir=%{buildroot}/%{_sysconfdir}/%{name}
+scons debug=1 install install_dir=%{buildroot}%{_bindir} man_dir=%{buildroot}%{_mandir}/man8/ cfg_dir=%{buildroot}/%{_sysconfdir}/%{name}
%{__install} -Dp -m 0755 %{SOURCE1} %{buildroot}%{_initrddir}/%{name}
%{__install} -Dp -m 0755 %{SOURCE2} %{buildroot}%{_sysconfdir}/cron.weekly/98-%{name}-scrub
%{__install} -Dp -m 0755 %{SOURCE3} %{buildroot}%{_sysconfdir}/sysconfig/%{name}
@@ -81,36 +81,43 @@ scons install install_dir=%{buildroot}%{
%{__rm} -rf %{buildroot}
%post
-if [ $1 = 1 ] ; then
- /sbin/chkconfig --add %{name}
- /sbin/service %{name} start >/dev/null 2>&1 || :
-fi
+# echo "Post: $1 packages"
# Move cache if upgrading
oldcache=/etc/zfs/zpool.cache # this changed per 0.6.9, only needed when upgrading from earlier versions
newcache=/var/lib/zfs/zpool.cache
if [[ -f $oldcache && ! -e $newcache ]]; then
- # %{echo:Moving existing zpool.cache to new location}
echo "Moving existing zpool.cache to new location"
mkdir -p $(dirname $newcache)
mv $oldcache $newcache
else
if [ -e $oldcache ]; then
- # %{warn:Note: old zpool.cache present but no longer used ($oldcache)}
echo "Note: old zpool.cache present but no longer used ($oldcache)"
fi
fi
+if [ $1 = 1 ] ; then
+ echo "Initial install. Starting service"
+ /sbin/chkconfig --add %{name}
+ /sbin/service %{name} start >/dev/null 2>&1 || :
+fi
+
%preun
+# echo "Preun: $1 packages"
if [ $1 = 0 ] ; then
+ echo "Stopping service since we are uninstalling last package"
/sbin/service %{name} stop >/dev/null 2>&1 || :
/sbin/chkconfig --del %{name}
fi
%postun
+# echo "Postun: $1 packages"
if [ $1 -ge 1 ] ; then
+ echo "Restarting since we have updated the package"
/sbin/service %{name} condrestart >/dev/null 2>&1 || :
+else
+ echo "Removing files since we removed the last package"
rm -rf /var/run/zfs
rm -rf /var/lock/zfs
fi
@@ -135,6 +142,9 @@ fi
%{_mandir}/man8/zstreamdump.8.gz
%changelog
+* Mon Jul 05 2010 Uwe Kubosch <uwe at kubosch.no> - 0.6.9-5
+- Cleanup of RPM spec and init script
+
* Sun Jul 04 2010 Uwe Kubosch <uwe at kubosch.no> - 0.6.9-4
- Patched SConstruct to define NDEBUG instead of DEBUG to avoid debug code while still generating debug symbols
- Added moving of zfs.cache when updating from pre 0.6.9 version
More information about the scm-commits
mailing list