--help and --version are implemented in the usual style.
help() prints full path, since the program is not expected to
be in $PATH.
#include "parse-util.h"
#include "path-util.h"
#include "selinux-util.h"
+#include "service-util.h"
#include "signal-util.h"
#include "strv.h"
#include "user-util.h"
log_setup_service();
+ r = service_parse_argv("systemd-hostnamed.service",
+ "Manage the system hostname and related metadata.",
+ argc, argv);
+ if (r <= 0)
+ return r;
+
umask(0022);
mac_selinux_init();
- if (argc != 1) {
- log_error("This program takes no arguments.");
- return -EINVAL;
- }
-
assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGTERM, SIGINT, -1) >= 0);
r = sd_event_default(&event);
#include "path-util.h"
#include "process-util.h"
#include "signal-util.h"
+#include "service-util.h"
#include "socket-util.h"
#include "stat-util.h"
#include "string-table.h"
log_setup_service();
- umask(0022);
+ r = service_parse_argv("systemd-importd.service",
+ "VM and container image import and export service.",
+ argc, argv);
+ if (r <= 0)
+ return r;
- if (argc != 1) {
- log_error("This program takes no arguments.");
- return -EINVAL;
- }
+ umask(0022);
assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGCHLD, -1) >= 0);
#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"
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);
#include "parse-util.h"
#include "process-util.h"
#include "selinux-util.h"
+#include "service-util.h"
#include "signal-util.h"
#include "strv.h"
#include "terminal-util.h"
log_set_facility(LOG_AUTH);
log_setup_service();
- umask(0022);
+ r = service_parse_argv("systemd-logind.service",
+ "Manager for user logins and devices and privileged operations.",
+ argc, argv);
+ if (r <= 0)
+ return r;
- if (argc != 1) {
- log_error("This program takes no arguments.");
- return -EINVAL;
- }
+ umask(0022);
r = mac_selinux_init();
if (r < 0)
#include "machined.h"
#include "main-func.h"
#include "process-util.h"
+#include "service-util.h"
#include "signal-util.h"
#include "special.h"
log_set_facility(LOG_AUTH);
log_setup_service();
- umask(0022);
+ r = service_parse_argv("systemd-machined.service",
+ "Manage registrations of local VMs and containers.",
+ argc, argv);
+ if (r <= 0)
+ return r;
- if (argc != 1) {
- log_error("This program takes no arguments.");
- return -EINVAL;
- }
+ umask(0022);
/* Always create the directories people can create inotify watches in. Note that some applications might check
* for the existence of /run/systemd/machines/ to determine whether machined is available, so please always
#include "resolved-manager.h"
#include "resolved-resolv-conf.h"
#include "selinux-util.h"
+#include "service-util.h"
#include "signal-util.h"
#include "user-util.h"
log_setup_service();
- if (argc != 1)
- return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "This program takes no arguments.");
+ r = service_parse_argv("systemd-resolved.service",
+ "Provide name resolution with caching using DNS, mDNS, LLMNR.",
+ argc, argv);
+ if (r <= 0)
+ return r;
umask(0022);
#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"
log_setup_service();
- umask(0022);
+ r = service_parse_argv("systemd-timedated.service",
+ "Manage the system clock and timezone and NTP enablement.",
+ argc, argv);
+ if (r <= 0)
+ return r;
- if (argc != 1)
- return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "This program takes no arguments.");
+ umask(0022);
assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGTERM, SIGINT, -1) >= 0);