]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
timesyncd: Improve sync log message. Fixes #11548.
authorNiklas Hambüchen <mail@nh2.me>
Thu, 24 Jan 2019 19:52:01 +0000 (20:52 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 24 Jan 2019 22:52:24 +0000 (23:52 +0100)
This makes it clear that the user should not expect more log messages
each time the time is synchronised.

src/timesync/timesyncd-manager.c

index b3bd7235c90973372ea49e72eb57c289b3aa4ed0..6fde4a316b13bef33389e50560af6950577bab6b 100644 (file)
@@ -616,8 +616,9 @@ static int manager_receive_response(sd_event_source *source, int fd, uint32_t re
                 m->good = true;
 
                 server_address_pretty(m->current_server_address, &pretty);
-                log_info("Synchronized to time server %s (%s).", strna(pretty), m->current_server_name->string);
-                sd_notifyf(false, "STATUS=Synchronized to time server %s (%s).", strna(pretty), m->current_server_name->string);
+                /* "for the first time", as further successful syncs will not be logged. */
+                log_info("Synchronized to time server for the first time %s (%s).", strna(pretty), m->current_server_name->string);
+                sd_notifyf(false, "STATUS=Synchronized to time server for the first time %s (%s).", strna(pretty), m->current_server_name->string);
         }
 
         r = manager_arm_timer(m, m->poll_interval_usec);