rpms/zfs-fuse/F-12 zfs-fuse.init,1.5,1.6 zfs-fuse.spec,1.34,1.35

Uwe Kubosch donv at fedoraproject.org
Sun Jul 4 21:32:57 UTC 2010


Author: donv

Update of /cvs/pkgs/rpms/zfs-fuse/F-12
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv7740

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/F-12/zfs-fuse.init,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -p -r1.5 -r1.6
--- zfs-fuse.init	31 Dec 2009 16:45:15 -0000	1.5
+++ zfs-fuse.init	4 Jul 2010 21:32:57 -0000	1.6
@@ -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/F-12/zfs-fuse.spec,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -p -r1.34 -r1.35
--- zfs-fuse.spec	4 Jul 2010 13:47:51 -0000	1.34
+++ zfs-fuse.spec	4 Jul 2010 21:32:57 -0000	1.35
@@ -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,10 +81,7 @@ 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
@@ -100,15 +97,27 @@ else
   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
@@ -133,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