diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-05-06 01:37:29 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-05-06 01:37:29 +0200 |
commit | 881c74201d42d84f076e11d4ed765bd8421a6ff0 (patch) | |
tree | 8bc95af2a9e7a2e607def543cace5b913622a344 /src | |
parent | becad8f1ed696433b9841cbb9c4603c303338d30 (diff) |
timesyncd: add a more servers by default
Diffstat (limited to 'src')
-rw-r--r-- | src/timesync/timesyncd.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/timesync/timesyncd.c b/src/timesync/timesyncd.c index 26d26b0d6d..4f4c3baa74 100644 --- a/src/timesync/timesyncd.c +++ b/src/timesync/timesyncd.c @@ -40,6 +40,7 @@ #include "socket-util.h" #include "list.h" #include "ratelimit.h" +#include "strv.h" #include "sd-event.h" #include "sd-resolve.h" #include "sd-daemon.h" @@ -1019,6 +1020,7 @@ static void manager_free(Manager *m) { int main(int argc, char *argv[]) { _cleanup_manager_free_ Manager *m = NULL; + const char *x; int r; log_set_target(LOG_TARGET_AUTO); @@ -1035,10 +1037,13 @@ int main(int argc, char *argv[]) { sd_notify(false, "READY=1"); - r = manager_add_server(m, "time1.google.com"); - if (r < 0) { - log_error("Failed to add server: %s", strerror(-r)); - goto out; + FOREACH_STRING(x, "time1.google.com", "time2.google.com", "time3.google.com", "time4.google.com", "0.fedora.pool.ntp.org") { + + r = manager_add_server(m, x); + if (r < 0) { + log_error("Failed to add server %s: %s", x, strerror(-r)); + goto out; + } } r = manager_connect(m); |