Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[gelöst] systemd: ntpdate wird nicht gestartet
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
boospy
Guru
Guru


Joined: 07 Feb 2010
Posts: 308
Location: Austria

PostPosted: Thu Aug 14, 2014 10:12 am    Post subject: [gelöst] systemd: ntpdate wird nicht gestartet Reply with quote

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
View user's profile Send private message
schmidicom
Veteran
Veteran


Joined: 09 Mar 2006
Posts: 1924
Location: Schweiz

PostPosted: Thu Aug 14, 2014 10:28 am    Post subject: Reply with quote

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
View user's profile Send private message
boospy
Guru
Guru


Joined: 07 Feb 2010
Posts: 308
Location: Austria

PostPosted: Thu Aug 14, 2014 10:44 am    Post subject: Reply with quote

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
View user's profile Send private message
schmidicom
Veteran
Veteran


Joined: 09 Mar 2006
Posts: 1924
Location: Schweiz

PostPosted: Thu Aug 14, 2014 10:52 am    Post subject: Reply with quote

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
View user's profile Send private message
boospy
Guru
Guru


Joined: 07 Feb 2010
Posts: 308
Location: Austria

PostPosted: Thu Aug 14, 2014 10:57 am    Post subject: Reply with quote

Ah, ok, jetzt hab ichs verstanden. Danke erstmal. Ich check das gleich ab.

lg
Back to top
View user's profile Send private message
boospy
Guru
Guru


Joined: 07 Feb 2010
Posts: 308
Location: Austria

PostPosted: Thu Aug 14, 2014 12:50 pm    Post subject: Reply with quote

Ok, das Teil funzt super. Habs auch gleich im Wiki ausgebessert: http://wiki.gentoo.org/wiki/Systemd#Time_.26_Date
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum