Move stop and disable of man-db.timer into pre scriplet

This commit is contained in:
Jan Chaloupka 2015-01-05 13:47:56 +01:00
parent 9bd533379a
commit 2a2705aa52

View File

@ -75,18 +75,18 @@ install -D -p -m 0644 init/systemd/man-db.conf $RPM_BUILD_ROOT/usr/lib/tmpfiles.
%find_lang %{name}
%find_lang %{name}-gnulib
# clear the old cache
%post
%{__rm} -rf %{cache}/*
%preun
# stop and disable timer from previous builds
%pre
rpm -q systemd > /dev/null
if [ "$?" -eq 0 ]; then
systemctl stop man-db.timer
systemctl -q disable man-db.timer
fi
# clear the old cache
%post
%{__rm} -rf %{cache}/*
%files -f %{name}.lang -f %{name}-gnulib.lang
%{!?_licensedir:%global license %%doc}
%license docs/COPYING