You are not logged in.
Hi,
i recently switched to systemd as initprocess and have a little problem with my timezone, because openntpd is started before a wlan-connection is established.
Is there a workaround for this?
Before using systemd i had an entry in rc.local who started openntpd with a delay of 4 minutes and i know i can use rc.local with systemd, but i think it must be possible to have the established internetconnection as an dependency of openntpd.
Any help is appreciated ![]()
Last edited by D4ve (2012-08-27 21:10:57)
Offline
There should be an option to have the NTP service launch only after the network has been brought up.
Actually, that's already the case:
$ cat multi-user.target.wants/ntpd.service
[Unit]
Description=Network Time Service
After=network.target nss-lookup.target
[Service]
Type=forking
PrivateTmp=true
ExecStart=/usr/bin/ntpd -g -u ntp:ntp
ControlGroup=cpu:/
[Install]
WantedBy=multi-user.targetSo there's probably something going wrong at the network part.
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline
Well, i use openntpd, not ntpd.
Heres the .service from openntpd:
[Unit]
Description=OpenNTP Daemon
After=network.target
[Service]
Type=forking
ExecStart=/usr/sbin/ntpd -s
[Install]
WantedBy=multi-user.targetI think i see the error ![]()
EDIT: I've added nss-lookup.target to "After=network.target " and it didn't change anything (Of course i rebooted).
What systemctl says:
# systemctl status openntpd
openntpd.service - OpenNTP Daemon
Loaded: loaded (/usr/lib/systemd/system/openntpd.service; enabled)
Active: active (running) since Mon, 27 Aug 2012 20:56:08 +0200; 7min ago
CGroup: name=systemd:/system/openntpd.service
├ 441 /usr/sbin/ntpd -s
└ 625 /usr/sbin/ntpd -sHm, is it loaded twice?!
Last edited by D4ve (2012-08-27 17:05:26)
Offline
is there a reason to use openntpd instead of ntpd?
Last edited by kevku (2012-08-27 17:12:42)
Offline
is there a reason to use openntpd instead of ntpd?
No.
The wiki says, that openntpd is no longer supported, so i'm switching to ntpd.
Solved ![]()
Offline
It would be even better to switch to chrony.
Offline
I'm not 24/7 online, so it seems to be the better solution. I'll try it out ![]()
EDIT: With chrony i have the same problems as with openntpd, only ntpd works correct.
Last edited by D4ve (2012-08-27 18:05:48)
Offline