On Mon, Dec 07, 2020 at 10:47:31AM +0000, Zbigniew Jędrzejewski-Szmek wrote:
Since the plan it to Obsolete the old package, I think you should
trigger
on the removal of it:
%triggerun ntp <= ...
# copy service enablement from the old name to the new name
if systemctl is-enabled -q ntpd 2>/dev/null; then
systemctl enable ntpsecd # if the name is different...
fi
More magic is needed. The service name is the same (ntpd). The ntpsec
post disables the service before the triggerun runs. I suspect the
original state needs to be captured first in a triggerprein or pre
scriptlet.
--
Miroslav Lichvar