Hi, I'm running systemd [1] on an embbeded Linux with
read-only filesystem. Due to missing realtime clock,
I'd like to set the clock by either NTP or by hand.

To set the time by hand with 'timedatectl set-time "time"',
NTP has to be disabled, but I cannot run 'timedatectl set-ntp false'
due to the read-only root filesystem.

If I got it right, 'timedatectl set-ntp true/false'
just creates or removes the link
/etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service

I can create/remove the link by hand too, and after rebooting 'timedatectl status' says NTP enabled or disabled.

So I naively created the following link structure (which works):

/etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service ->
/mnt/writeable/systemd-timesyncd ->
/lib/systemd/system/systemd-timesyncd.service

But if I remove /mnt/writeable/systemd-timesyncd and reboot,
the command 'timedatectl status' still reports enabled, which is unexpected.

Do you have any hints or recommendations on this?

Thanks and best regards,
Andre

[1] systemd 219
+PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP
-LIBCRYPTSETUP -GCRYPT +GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID
-ELFUTILS +KMOD +IDN
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to