[systemd-devel] timesyncd on systems without battery
Daniel Tihelka
dtihelka at gmail.com
Mon Jan 4 08:53:24 UTC 2021
Hello,
I run systemd on a NAS without internal-clock-holding battery, so I think
that
the systemd-timesyncd sets the time to the last known value after restart
and
syncs it from the network when on-line. Is it right?
Now, I have a shutdown timer unit, which powers the NAS off at the given
time.
However, sometimes (about 50% of cases), when the device is powered-on, it
switches off immediately. When switched-on again, it boots as expected.
The question is, is there a way of fixing this issue? I have tried to add
sleep
to skip to the next minute (ExecStart should be triggered one after
another), but unsuccessfully.
Thank you,
DT
Here are the unit files.
timer:
[Unit]
Description=Poweroff the system on scheduled time
[Timer]
# Power off at the given time
OnCalendar=Mon,Tue,Wed,Thu,Fri *-*-* 01:10:00
OnCalendar=Sat,Sun *-*-* 01:55:00
[Install]
WantedBy=timers.target
---
service:
[Unit]
Description=Poweroff the system
[Service]
Type=oneshot
ExecStart=/bin/sleep 80
ExecStart=/usr/bin/systemctl poweroff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20210104/02aceb25/attachment.htm>
More information about the systemd-devel
mailing list