[systemd-devel] systemd-timesyncd with read-only root filesystem

Martin Pitt martin.pitt at ubuntu.com
Sat Dec 10 17:01:29 UTC 2016


Hello André,

André Hartmann [2016-12-09 10:46 +0100]:
> To sum up again what I actually want to achive:
> 
> I want to use NTP after bootup by default, but in case no NTP is available,
> the user should be able to set the date and time by hand
> with timedatectl. But timedatectl refuses to do so, if "NTP is enabled".
> 
> And this is my main problem: I don't know how timedatectl decides
> if NTP is enabled or not.

It checks whether systemd-timesyncd.service is enabled. Likewise,
enabling/disabling NTP with "timedatectl set-ntp" is just a frontend
for "systemctl enable/disable systemd-timesyncd.service".

Again this requires /etc/systemd/system/ to be writable, of course --
but if you want to allow users to configure the system
(/etc/systemd/system/ or /etc/timezone etc.) you need to have at least
these directories writable.

> > > # systemctl status systemd.timesyncd
> > > *  systemd.timesyncd.service
> > >    Loaded: not-found (Reason: No such file or directory)
> > >    Active: inactive (dead)

It's systemd-timesyncd (dash, not dot).

Viele Grüße,

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


More information about the systemd-devel mailing list