Bug#801389: Disabling timedatectl/NTP across package upgrades

Martin Pitt mpitt at debian.org
Fri Oct 9 14:23:25 BST 2015


Control: tag -1 moreinfo

Hello Yuri,

Yuri D'Elia [2015-10-09 15:11 +0200]:
> Version: 227-1
> 
> I'm trying to disable time syncronization, but I've found two issues happening
> during upgrades:
> 
> - Disabling systemd-timesyncd.service is not enough.
>   systemd-timesyncd.service gets automatically re-enabled on upgrade.
> 
>   Is this intended? I would argue that a disabled service should stay disabled
>   on upgrades.

No, this isn't intended. The postinst does

   if dpkg --compare-versions "$2" lt "218-11~"; then
       systemctl enable systemd-timesyncd.service || true
   fi

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 can't reproduce this by upgrading from 226 to 227.

> - I tried using timedatectl instead, even though I see no reason to use the
>   timesyncd service at all.
> 
>   But "timedatectl set-ntp false" also got reset on package upgrades.
>   The manual page of timedatectl gives no information on where this setting is
>   actually stored.

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.

Thanks,

Martin
-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)




More information about the Pkg-systemd-maintainers mailing list