drop old systemd scriptlets

This commit is contained in:
Miroslav Lichvar 2013-05-09 10:53:41 +02:00
parent 73be72a6b1
commit 8cf1c43c79

View File

@ -21,9 +21,9 @@ Patch1: chrony-delta.patch
BuildRequires: libcap-devel libedit-devel nss-devel pps-tools-devel bison texinfo BuildRequires: libcap-devel libedit-devel nss-devel pps-tools-devel bison texinfo
Requires(pre): shadow-utils Requires(pre): shadow-utils
Requires(post): systemd-units info Requires(post): systemd info
Requires(preun): systemd-units info Requires(preun): systemd info
Requires(postun): systemd-units Requires(postun): systemd
%description %description
A client/server for the Network Time Protocol, this program keeps your A client/server for the Network Time Protocol, this program keeps your
@ -97,24 +97,12 @@ getent passwd chrony > /dev/null || /usr/sbin/useradd -r -g chrony \
: :
%post %post
%if 0%{?systemd_post:1}
%systemd_post chronyd.service chrony-wait.service %systemd_post chronyd.service chrony-wait.service
%else
/bin/systemctl daemon-reload &> /dev/null
%endif
/sbin/install-info %{_infodir}/chrony.info.gz %{_infodir}/dir &> /dev/null /sbin/install-info %{_infodir}/chrony.info.gz %{_infodir}/dir &> /dev/null
: :
%preun %preun
%if 0%{?systemd_preun:1}
%systemd_preun chronyd.service chrony-wait.service %systemd_preun chronyd.service chrony-wait.service
%else
if [ "$1" -eq 0 ]; then
/bin/systemctl --no-reload disable \
chrony-wait.service chronyd.service &> /dev/null
/bin/systemctl stop chrony-wait.service chronyd.service &> /dev/null
fi
%endif
if [ "$1" -eq 0 ]; then if [ "$1" -eq 0 ]; then
/sbin/install-info --delete %{_infodir}/chrony.info.gz \ /sbin/install-info --delete %{_infodir}/chrony.info.gz \
%{_infodir}/dir &> /dev/null %{_infodir}/dir &> /dev/null
@ -122,15 +110,7 @@ fi
: :
%postun %postun
%if 0%{?systemd_postun_with_restart:1}
%systemd_postun_with_restart chronyd.service %systemd_postun_with_restart chronyd.service
%else
/bin/systemctl daemon-reload &> /dev/null
if [ "$1" -ge 1 ]; then
/bin/systemctl try-restart chronyd.service &> /dev/null
fi
%endif
:
%files %files
%doc COPYING NEWS README chrony.txt faq.txt examples/* %doc COPYING NEWS README chrony.txt faq.txt examples/*