Bug#801389: Disabling timedatectl/NTP across package upgrades
Yuri D'Elia
wavexx at thregr.org
Fri Oct 9 14:56:03 BST 2015
On 09/10/15 15:23, Martin Pitt wrote:
> i. e. it only gets enabled once on a fresh install, or when you
> upgrade from jessie. But not e. g. from 226-1 to 227-1. Which version
> did you upgrade from?
I'm following unstable on a KVM instance where I explicitly do not want
time sync, so I'm unsure on which version this got re-enabled.
I noticed this issue some months ago, where I disabled the service on
two occasions, then tried using timedatectl, and noticed today that the
service got re-enabled again just before reporting the issue.
I'm sure the service was disabled correctly on all occasions, but it got
re-enabled by was I assumed to be package upgrades.
Was the systemctl check always into place, or was it added just
recently? (just so I can avoid scavenging through log files).
> It kind of does: "This command is hence mostly equivalent to:
> systemctl enable --now systemd-timesyncd.service and systemctl disable
> --now systemd-timesyncd.service, but is protected by a different
> access policy." -- I. e. it is stored as the symlink
> /etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service .
>
> So this indeed is just a variant of what you see above with disabling
> with systemctl.
Which method is recommended then? Both should survive through package
updates I guess.
Also, responding in-line to Michael:
> root at pluto:/# systemctl is-enabled systemd-timesyncd
> disabled
>
> What commands did you use exactly to disable the service?
Simply:
systemctl disable --now systemd-timesyncd
and
timedatectl set-ntp false
> Do you have a /run/systemd/was-enabled file?
> Could you attach that, please.
The system got rebooted a couple of times.
was-enabled is missing right now.
More information about the Pkg-systemd-maintainers
mailing list