summaryrefslogtreecommitdiff
path: root/src/locale
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-04-23 10:19:46 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-05-03 10:55:51 +0200
commitfc021a5bbf1b00a3ac21845f3102f1a6379a9357 (patch)
treeba28af074ae6109739ef5dfdeb3fad927d34f65a /src/locale
parent7ae473268c092cbe8235462c0aea923d9ce36901 (diff)
downloadsystemd-fc021a5bbf1b00a3ac21845f3102f1a6379a9357.tar.gz
logind,importd,hostnamed,localed,timedated,machined,resolved: add option parsing stubs
--help and --version are implemented in the usual style. help() prints full path, since the program is not expected to be in $PATH.
Diffstat (limited to 'src/locale')
-rw-r--r--src/locale/localed.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/locale/localed.c b/src/locale/localed.c
index 7315d93a98..a0fcadcc91 100644
--- a/src/locale/localed.c
+++ b/src/locale/localed.c
@@ -25,6 +25,7 @@
#include "missing_capability.h"
#include "path-util.h"
#include "selinux-util.h"
+#include "service-util.h"
#include "signal-util.h"
#include "string-util.h"
#include "strv.h"
@@ -754,12 +755,15 @@ static int run(int argc, char *argv[]) {
log_setup_service();
+ r = service_parse_argv("systemd-localed.service",
+ "Manage system locale settings and key mappings.",
+ argc, argv);
+ if (r <= 0)
+ return r;
+
umask(0022);
mac_selinux_init();
- if (argc != 1)
- return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "This program takes no arguments.");
-
assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGTERM, SIGINT, -1) >= 0);
r = sd_event_default(&event);