summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2024-09-10 21:05:31 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2024-09-10 21:08:06 +0200
commit4a851db694a63b08265e62483c92ce25427f0414 (patch)
tree0e6b7371ce7c443cc28b41f82204b6500f081fd8 /src
parenttimesync: use BusObjectImplementation (diff)
downloadsystemd-4a851db694a63b08265e62483c92ce25427f0414.tar.xz
systemd-4a851db694a63b08265e62483c92ce25427f0414.zip
timesync: add support of basic command line options
Diffstat (limited to 'src')
-rw-r--r--src/timesync/timesyncd.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/timesync/timesyncd.c b/src/timesync/timesyncd.c
index a1b63038c4..69c6b8e72a 100644
--- a/src/timesync/timesyncd.c
+++ b/src/timesync/timesyncd.c
@@ -7,6 +7,7 @@
#include "sd-event.h"
#include "sd-messages.h"
+#include "bus-log-control-api.h"
#include "capability-util.h"
#include "clock-util.h"
#include "daemon-util.h"
@@ -16,6 +17,7 @@
#include "mkdir-label.h"
#include "network-util.h"
#include "process-util.h"
+#include "service-util.h"
#include "signal-util.h"
#include "timesyncd-bus.h"
#include "timesyncd-conf.h"
@@ -144,6 +146,13 @@ static int run(int argc, char *argv[]) {
log_set_facility(LOG_CRON);
log_setup();
+ r = service_parse_argv("systemd-timesyncd.service",
+ "Network time synchronization",
+ BUS_IMPLEMENTATIONS(&manager_object, &log_control_object),
+ argc, argv);
+ if (r <= 0)
+ return r;
+
umask(0022);
if (argc != 1)