From 4e0598bf78c34f9b15edf5dee5560ed9b7d69bef Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Sun, 25 Sep 2016 11:57:03 +0300 Subject: [PATCH] fix broken uninstall --- rlocate.spec | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/rlocate.spec b/rlocate.spec index d7afb08..6c8022c 100644 --- a/rlocate.spec +++ b/rlocate.spec @@ -3,6 +3,7 @@ # - device: installed with static major, module creates as dynamic => use udev # - should provide something like virtual(locate), obsolete other implementations # - conflicts: rlocate gid with slocate +# - pldize initscript # # Conditional build: %bcond_without kernel # don't build kernel modules @@ -40,7 +41,7 @@ Conflicts: slocate BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description -rlocate is an implementation of the ``locate'' command that is always +rlocate is an implementation of the locate command that is always up-to-date. The database that the original locate uses is usually updated only once a day, so newer files cannot be located right away. The behavior of rlocate is the same as slocate, but it also maintains @@ -128,13 +129,15 @@ fi /sbin/chkconfig --add %{name} %service %{name} restart +%preun +if [ "$1" = "0" ]; then + %service -q %{name} stop + /sbin/chkconfig --del %{name} +fi + %postun if [ "$1" = "0" ]; then %groupremove rlocate -else -if [ "$1" = "0" ]; then - %service -q %{name} stop - /sbin/chkconfig --del %{name} fi %if %{with userspace} -- 2.44.0