%endif
/usr/lib/lsb/install_initd @PACKAGE@ 2>/dev/null || \
/sbin/chkconfig --add @PACKAGE@
+touch %{_var}/lock/subsys/@PACKAGE@
%if ! %{static}
%post install
%preun
%if ! %{static}
+%preun fuse
+%endif
+/usr/lib/lsb/remove_initd @PACKAGE@ 2>/dev/null || \
+ /sbin/chkconfig --del @PACKAGE@
+%{_initrddir}/@PACKAGE@ stop
+rm -f %{_var}/lock/subsys/@PACKAGE@
+
+%if ! %{static}
%preun install
%endif
%{_sbindir}/captive-install-fstab --remove
rm -rf %{_var}/lib/@PACKAGE@/s-*
rm -rf %{_var}/lib/@PACKAGE@/tmp/*
-%if ! %{static}
-%postun fuse
-%endif
-/usr/lib/lsb/remove_initd @PACKAGE@ 2>/dev/null || \
- /sbin/chkconfig --del @PACKAGE@
-
%files
%defattr(-,root,root)
%doc README NEWS AUTHORS THANKS TODO