View previous topic :: View next topic |
Author |
Message |
boospy Guru
Joined: 07 Feb 2010 Posts: 308 Location: Austria
|
Posted: Thu Aug 14, 2014 10:12 am Post subject: [gelöst] systemd: ntpdate wird nicht gestartet |
|
|
Hallo Leute,
hab hier ein Problem mit dem ntpdate von systemd. Beim Sytemstart sollte die Uhrzeit ja einmal gesetzt werden. Problem dabei, ntpdate kann nicht starten, da es zum Startzeitpunkt noch kein Netzwerk gibt. Hab schon ein sleep in den Autostart gegeben, das müsste aber gute 25 Sekunden haben das es nützt. Es wird nämlich die Adresse per DHCP bezogen und auch noch eine Netzwerkbrücke erstellt. Das ganze über Networkmanager.
Ok, nun habe ich natürlich auch "NetworkManager-wait-online.service" was ja eigenlich genau das verhindern soll, das Services starten bevor wirklich eine IP vorhanden ist. Mach ich was falsch? Ich hab auch auf den Fedoraseiten gelesen das man ntpdate eigentlich nicht mehr einsetzen sollte. Man sollte lieber den ntpd nehmen. Schön und gut, aber wenn mein Rechner vielleicht mal 2 - 3 Wochen nicht laufen sollte, kann es sein das die Zeit dann zu weit abtrifftet und somit von ntpd nicht mehr synchronisiert werden kann.
Danke für eure Hilfe und lg
boospy
Last edited by boospy on Thu Aug 14, 2014 12:50 pm; edited 1 time in total |
|
Back to top |
|
|
schmidicom Veteran
Joined: 09 Mar 2006 Posts: 1924 Location: Schweiz
|
Posted: Thu Aug 14, 2014 10:28 am Post subject: |
|
|
So weit ich weiß führt in Kombination mit dem Networkmanager unter systemd der einzig gangbare Weg über das Programm "timedatectl".
Code: | pc66am ~ # timedatectl
Local time: Do 2014-08-14 12:29:09 CEST
Universal time: Do 2014-08-14 10:29:09 UTC
RTC time: Do 2014-08-14 10:29:09
Time zone: Europe/Zurich (CEST, +0200)
NTP enabled: yes
NTP synchronized: yes
RTC in local TZ: no
DST active: yes
Last DST change: DST began at
So 2014-03-30 01:59:59 CET
So 2014-03-30 03:00:00 CEST
Next DST change: DST ends (the clock jumps one hour backwards) at
So 2014-10-26 02:59:59 CEST
So 2014-10-26 02:00:00 CET |
Aber um das Tool vollständig nutzen zu können muss "net-misc/ntp" installiert und in der "/etc/ntp.conf" mindestens ein funktionierender Server aufgelistet sein. _________________ Lenovo - ThinkPad P16s Gen 2 - 21K9CTO1WW |
|
Back to top |
|
|
boospy Guru
Joined: 07 Feb 2010 Posts: 308 Location: Austria
|
Posted: Thu Aug 14, 2014 10:44 am Post subject: |
|
|
Also das ist bei mir alles schon so eingerichtet, war wohl noch in openrc so. Da steht dann http://wiki.gentoo.org/wiki/System_time#systemd_3
Also setzt systemd die Systemzeit ja doch schon irgendwie? Und wo sollte ich dann timedatectl eintragen, oder meinst du nur um manuel selbst einmal zu synchen? Das geht ja mit ntpdate.service manuel nach dem start schon.
lg
boospy |
|
Back to top |
|
|
schmidicom Veteran
Joined: 09 Mar 2006 Posts: 1924 Location: Schweiz
|
Posted: Thu Aug 14, 2014 10:52 am Post subject: |
|
|
timedatectl ist ein Teil von systemd und ein Frontend zum Serviceunit "timedated.service" welches bei jeder systemd Installation vorhanden sein sollte.
Code: | pc66am ~ # systemctl status systemd-timedated.service
● systemd-timedated.service - Time & Date Service
Loaded: loaded (/usr/lib64/systemd/system/systemd-timedated.service; static)
Active: inactive (dead)
Docs: man:systemd-timedated.service(8)
man:localtime(5)
http://www.freedesktop.org/wiki/Software/systemd/timedated
Aug 14 12:24:53 pc66am systemd[1]: Starting Time & Date Service...
Aug 14 12:24:53 pc66am systemd[1]: Started Time & Date Service.
Aug 14 12:29:09 pc66am systemd[1]: Starting Time & Date Service...
Aug 14 12:29:09 pc66am systemd[1]: Started Time & Date Service. |
Genaueres dazu findet man in den Manpages zu "systemd-timedated.service" und "timedatectl". _________________ Lenovo - ThinkPad P16s Gen 2 - 21K9CTO1WW |
|
Back to top |
|
|
boospy Guru
Joined: 07 Feb 2010 Posts: 308 Location: Austria
|
Posted: Thu Aug 14, 2014 10:57 am Post subject: |
|
|
Ah, ok, jetzt hab ichs verstanden. Danke erstmal. Ich check das gleich ab.
lg |
|
Back to top |
|
|
boospy Guru
Joined: 07 Feb 2010 Posts: 308 Location: Austria
|
|
Back to top |
|
|
|