Fix systemd-related scriptlets.
chronyd is not enabled by default, so don't try to unilaterally enable the systemd service. Instead, handle migrations from previously enabled systems with a trigger.
This commit is contained in:
parent
f58e2b79c7
commit
754034dd80
11
chrony.spec
11
chrony.spec
@ -90,11 +90,12 @@ getent passwd chrony > /dev/null || /usr/sbin/useradd -r -g chrony \
|
|||||||
|
|
||||||
%post
|
%post
|
||||||
/sbin/chkconfig --add chronyd
|
/sbin/chkconfig --add chronyd
|
||||||
/sbin/chkconfig chronyd &> /dev/null &&
|
/bin/systemctl daemon-reload &> /dev/null || :
|
||||||
/bin/systemctl enable chronyd.service &> /dev/null ||
|
|
||||||
/bin/systemctl daemon-reload &> /dev/null
|
%triggerun -- chrony < 1.25
|
||||||
/sbin/install-info %{_infodir}/chrony.info.gz %{_infodir}/dir &> /dev/null
|
if /sbin/chkconfig --level 3 chronyd ; then
|
||||||
:
|
/bin/systemctl enable chronyd.esrvice &> /dev/null || :
|
||||||
|
fi
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
if [ "$1" -eq 0 ]; then
|
if [ "$1" -eq 0 ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user