diff --git a/man/systemctl.xml b/man/systemctl.xml
index 0e3b90b266..fb0ca46620 100644
--- a/man/systemctl.xml
+++ b/man/systemctl.xml
@@ -1032,7 +1032,7 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err
- Manager Lifecycle Commands
+ Manager State Commands
@@ -1051,6 +1051,7 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err
reload command.
+
daemon-reexec
@@ -1065,6 +1066,39 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err
+
+
+ log-level [LEVEL]
+
+ If no argument is given, print the current log level of the manager. If an
+ optional argument LEVEL is provided, then the command changes the
+ current log level of the manager to LEVEL (accepts the same values as
+ described in
+ systemd1).
+
+
+
+
+ log-target [TARGET]
+
+ If no argument is given, print the current log target of the manager. If an
+ optional argument TARGET is provided, then the command changes the
+ current log target of the manager to TARGET (accepts the same values as
+ , described in
+ systemd1).
+
+
+
+
+ service-watchdogs [yes|no]
+
+ If no argument is given, print the current state of service runtime watchdogs of
+ the manager. If an optional boolean argument is provided, then globally enables or disables the
+ service runtime watchdogs () and emergency actions (e.g.
+ or ); see
+ systemd.service5.
+ The hardware watchdog is not affected by this setting.
+
diff --git a/man/systemd-analyze.xml b/man/systemd-analyze.xml
index 02d7179e4c..dcb7cf29c1 100644
--- a/man/systemd-analyze.xml
+++ b/man/systemd-analyze.xml
@@ -39,25 +39,6 @@
UNIT
-
- systemd-analyze
- OPTIONS
- log-level
- LEVEL
-
-
- systemd-analyze
- OPTIONS
- log-target
- TARGET
-
-
- systemd-analyze
- OPTIONS
- service-watchdogs
- BOOL
-
-
systemd-analyze
OPTIONS
@@ -241,37 +222,6 @@ multi-user.target @47.820s
-
- systemd-analyze log-level [LEVEL]
-
- systemd-analyze log-level prints the current log level of the
- systemd daemon. If an optional argument LEVEL is
- provided, then the command changes the current log level of the systemd daemon to
- LEVEL (accepts the same values as described in
- systemd1).
-
-
-
- systemd-analyze log-target [TARGET]
-
- systemd-analyze log-target prints the current log target of the
- systemd daemon. If an optional argument TARGET is
- provided, then the command changes the current log target of the systemd daemon to
- TARGET (accepts the same values as , described
- in systemd1).
-
-
-
- systemd-analyze service-watchdogs [yes|no]
-
- systemd-analyze service-watchdogs prints the current state of service runtime
- watchdogs of the systemd daemon. If an optional boolean argument is provided, then
- globally enables or disables the service runtime watchdogs () and
- emergency actions (e.g. or ); see
- systemd.service5.
- The hardware watchdog is not affected by this setting.
-
-
systemd-analyze dump
diff --git a/src/analyze/analyze.c b/src/analyze/analyze.c
index c7f74274cb..991e61de7e 100644
--- a/src/analyze/analyze.c
+++ b/src/analyze/analyze.c
@@ -2166,8 +2166,8 @@ static int service_watchdogs(int argc, char *argv[], void *userdata) {
if (r < 0)
return log_error_errno(r, "Failed to create bus connection: %m");
- /* get ServiceWatchdogs */
if (argc == 1) {
+ /* get ServiceWatchdogs */
r = sd_bus_get_property_trivial(
bus,
"org.freedesktop.systemd1",
@@ -2182,28 +2182,25 @@ static int service_watchdogs(int argc, char *argv[], void *userdata) {
printf("%s\n", yes_no(!!b));
- return 0;
- }
+ } else {
+ /* set ServiceWatchdogs */
+ b = parse_boolean(argv[1]);
+ if (b < 0)
+ return log_error_errno(b, "Failed to parse service-watchdogs argument: %m");
- /* set ServiceWatchdogs */
- b = parse_boolean(argv[1]);
- if (b < 0) {
- log_error("Failed to parse service-watchdogs argument.");
- return -EINVAL;
+ r = sd_bus_set_property(
+ bus,
+ "org.freedesktop.systemd1",
+ "/org/freedesktop/systemd1",
+ "org.freedesktop.systemd1.Manager",
+ "ServiceWatchdogs",
+ &error,
+ "b",
+ b);
+ if (r < 0)
+ return log_error_errno(r, "Failed to set service-watchdog state: %s", bus_error_message(&error, r));
}
- r = sd_bus_set_property(
- bus,
- "org.freedesktop.systemd1",
- "/org/freedesktop/systemd1",
- "org.freedesktop.systemd1.Manager",
- "ServiceWatchdogs",
- &error,
- "b",
- b);
- if (r < 0)
- return log_error_errno(r, "Failed to set service-watchdog state: %s", bus_error_message(&error, r));
-
return 0;
}
@@ -2246,13 +2243,11 @@ static int help(int argc, char *argv[], void *userdata) {
printf("%s [OPTIONS...] COMMAND ...\n\n"
"%sProfile systemd, show unit dependencies, check unit files.%s\n"
"\nCommands:\n"
- " time Print time spent in the kernel\n"
+ " [time] Print time required to boot the machine\n"
" blame Print list of running units ordered by time to init\n"
" critical-chain [UNIT...] Print a tree of the time critical chain of units\n"
" plot Output SVG graphic showing service initialization\n"
" dot [UNIT...] Output dependency graph in %s format\n"
- " log-level [LEVEL] Get/set logging threshold for manager\n"
- " log-target [TARGET] Get/set logging target for manager\n"
" dump Output state serialization of service manager\n"
" cat-config Show configuration file and drop-ins\n"
" unit-files List files and symlinks for units\n"
@@ -2261,7 +2256,6 @@ static int help(int argc, char *argv[], void *userdata) {
" syscall-filter [NAME...] Print list of syscalls in seccomp filter\n"
" condition CONDITION... Evaluate conditions and asserts\n"
" verify FILE... Check unit files for correctness\n"
- " service-watchdogs [BOOL] Get/set service watchdog state\n"
" calendar SPEC... Validate repetitive calendar time events\n"
" timestamp TIMESTAMP... Validate a timestamp\n"
" timespan SPAN... Validate a time span\n"
@@ -2482,13 +2476,14 @@ static int run(int argc, char *argv[]) {
{ "critical-chain", VERB_ANY, VERB_ANY, 0, analyze_critical_chain },
{ "plot", VERB_ANY, 1, 0, analyze_plot },
{ "dot", VERB_ANY, VERB_ANY, 0, dot },
+ /* The following seven verbs are deprecated */
{ "log-level", VERB_ANY, 2, 0, get_or_set_log_level },
{ "log-target", VERB_ANY, 2, 0, get_or_set_log_target },
- /* The following four verbs are deprecated aliases */
{ "set-log-level", 2, 2, 0, set_log_level },
{ "get-log-level", VERB_ANY, 1, 0, get_log_level },
{ "set-log-target", 2, 2, 0, set_log_target },
{ "get-log-target", VERB_ANY, 1, 0, get_log_target },
+ { "service-watchdogs", VERB_ANY, 2, 0, service_watchdogs },
{ "dump", VERB_ANY, 1, 0, dump },
{ "cat-config", 2, VERB_ANY, 0, cat_config },
{ "unit-files", VERB_ANY, VERB_ANY, 0, do_unit_files },
@@ -2500,7 +2495,6 @@ static int run(int argc, char *argv[]) {
{ "calendar", 2, VERB_ANY, 0, test_calendar },
{ "timestamp", 2, VERB_ANY, 0, test_timestamp },
{ "timespan", 2, VERB_ANY, 0, dump_timespan },
- { "service-watchdogs", VERB_ANY, 2, 0, service_watchdogs },
{ "security", VERB_ANY, VERB_ANY, 0, do_security },
{}
};
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index 9200810654..07357c6edc 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -6343,6 +6343,145 @@ static int switch_root(int argc, char *argv[], void *userdata) {
return 0;
}
+static int log_level(int argc, char *argv[], void *userdata) {
+ sd_bus *bus;
+ _cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
+ int r;
+
+ r = acquire_bus(BUS_MANAGER, &bus);
+ if (r < 0)
+ return r;
+
+ if (argc == 1) {
+ _cleanup_free_ char *level = NULL;
+
+ r = sd_bus_get_property_string(
+ bus,
+ "org.freedesktop.systemd1",
+ "/org/freedesktop/systemd1",
+ "org.freedesktop.systemd1.Manager",
+ "LogLevel",
+ &error,
+ &level);
+ if (r < 0)
+ return log_error_errno(r, "Failed to get log level: %s", bus_error_message(&error, r));
+
+ puts(level);
+
+ } else {
+ assert(argc == 2);
+
+ r = sd_bus_set_property(
+ bus,
+ "org.freedesktop.systemd1",
+ "/org/freedesktop/systemd1",
+ "org.freedesktop.systemd1.Manager",
+ "LogLevel",
+ &error,
+ "s",
+ argv[1]);
+ if (r < 0)
+ return log_error_errno(r, "Failed to set log level: %s", bus_error_message(&error, r));
+ }
+
+ return 0;
+}
+
+static int log_target(int argc, char *argv[], void *userdata) {
+ sd_bus *bus;
+ _cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
+ int r;
+
+ r = acquire_bus(BUS_MANAGER, &bus);
+ if (r < 0)
+ return r;
+
+ if (argc == 1) {
+ _cleanup_free_ char *target = NULL;
+
+ r = sd_bus_get_property_string(
+ bus,
+ "org.freedesktop.systemd1",
+ "/org/freedesktop/systemd1",
+ "org.freedesktop.systemd1.Manager",
+ "LogTarget",
+ &error,
+ &target);
+ if (r < 0)
+ return log_error_errno(r, "Failed to get log target: %s", bus_error_message(&error, r));
+
+ puts(target);
+
+ } else {
+ assert(argc == 2);
+
+ r = sd_bus_set_property(
+ bus,
+ "org.freedesktop.systemd1",
+ "/org/freedesktop/systemd1",
+ "org.freedesktop.systemd1.Manager",
+ "LogTarget",
+ &error,
+ "s",
+ argv[1]);
+ if (r < 0)
+ return log_error_errno(r, "Failed to set log target: %s", bus_error_message(&error, r));
+ }
+
+ return 0;
+}
+
+static int service_watchdogs(int argc, char *argv[], void *userdata) {
+ sd_bus *bus;
+ _cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
+ int b, r;
+
+ assert(argv);
+
+ r = acquire_bus(BUS_MANAGER, &bus);
+ if (r < 0)
+ return r;
+
+ if (argc == 1) {
+ /* get ServiceWatchdogs */
+ r = sd_bus_get_property_trivial(
+ bus,
+ "org.freedesktop.systemd1",
+ "/org/freedesktop/systemd1",
+ "org.freedesktop.systemd1.Manager",
+ "ServiceWatchdogs",
+ &error,
+ 'b',
+ &b);
+ if (r < 0)
+ return log_error_errno(r, "Failed to get service-watchdog state: %s", bus_error_message(&error, r));
+
+ printf("%s\n", yes_no(!!b));
+
+ } else {
+ /* set ServiceWatchdogs */
+ assert(argc == 2);
+
+ b = parse_boolean(argv[1]);
+ if (b < 0)
+ return log_error_errno(b, "Failed to parse service-watchdogs argument: %m");
+
+ r = sd_bus_set_property(
+ bus,
+ "org.freedesktop.systemd1",
+ "/org/freedesktop/systemd1",
+ "org.freedesktop.systemd1.Manager",
+ "ServiceWatchdogs",
+ &error,
+ "b",
+ b);
+ if (r < 0)
+ return log_error_errno(r, "Failed to set service-watchdog state: %s", bus_error_message(&error, r));
+ }
+
+ return 0;
+}
+
static int set_environment(int argc, char *argv[], void *userdata) {
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL;
@@ -7727,7 +7866,7 @@ static int systemctl_help(void) {
" units\n"
" list-dependencies [UNIT] Recursively show units which are required\n"
" or wanted by this unit or by which this\n"
- " unit is required or wanted\n"
+ " unit is required or wanted"
"\n%3$sUnit File Commands:%4$s\n"
" list-unit-files [PATTERN...] List installed unit files\n"
" enable [UNIT...|PATH...] Enable one or more unit files\n"
@@ -7752,7 +7891,7 @@ static int systemctl_help(void) {
" get-default Get the name of the default target\n"
" set-default TARGET Set the default target\n"
"\n%3$sMachine Commands:%4$s\n"
- " list-machines [PATTERN...] List local containers and host\n\n"
+ " list-machines [PATTERN...] List local containers and host\n"
"\n%3$sJob Commands:%4$s\n"
" list-jobs [PATTERN...] List jobs\n"
" cancel [JOB...] Cancel all, one, or more jobs\n"
@@ -7760,10 +7899,13 @@ static int systemctl_help(void) {
" show-environment Dump environment\n"
" set-environment VARIABLE=VALUE... Set one or more environment variables\n"
" unset-environment VARIABLE... Unset one or more environment variables\n"
- " import-environment [VARIABLE...] Import all or some environment variables\n\n"
- "\n%3$sManager Lifecycle Commands:%4$s\n"
+ " import-environment [VARIABLE...] Import all or some environment variables\n"
+ "\n%3$sManager State Commands:%4$s\n"
" daemon-reload Reload systemd manager configuration\n"
" daemon-reexec Reexecute systemd manager\n"
+ " log-level [LEVEL] Get/set logging threshold for manager\n"
+ " log-target [TARGET] Get/set logging target for manager\n"
+ " service-watchdogs [BOOL] Get/set service watchdog state\n"
"\n%3$sSystem Commands:%4$s\n"
" is-system-running Check whether system is fully running\n"
" default Enter system default mode\n"
@@ -7779,68 +7921,63 @@ static int systemctl_help(void) {
" hibernate Hibernate the system\n"
" hybrid-sleep Hibernate and suspend the system\n"
" suspend-then-hibernate Suspend the system, wake after a period of\n"
- " time and put it into hibernate\n"
+ " time, and hibernate"
"\n%3$sOptions:%4$s\n"
- " -h --help Show this help\n"
- " --version Show package version\n"
- " --system Connect to system manager\n"
- " --user Connect to user service manager\n"
- " -H --host=[USER@]HOST\n"
- " Operate on remote host\n"
- " -M --machine=CONTAINER\n"
- " Operate on local container\n"
- " -t --type=TYPE List units of a particular type\n"
- " --state=STATE List units with particular LOAD or SUB or ACTIVE state\n"
- " --failed Shorcut for --state=failed\n"
- " -p --property=NAME Show only properties by this name\n"
- " -a --all Show all properties/all units currently in memory,\n"
- " including dead/empty ones. To list all units installed on\n"
- " the system, use the 'list-unit-files' command instead.\n"
- " -l --full Don't ellipsize unit names on output\n"
- " -r --recursive Show unit list of host and local containers\n"
- " --reverse Show reverse dependencies with 'list-dependencies'\n"
- " --job-mode=MODE Specify how to deal with already queued jobs, when\n"
- " queueing a new job\n"
- " -T --show-transaction\n"
- " When enqueuing a unit job, show full transaction\n"
- " --show-types When showing sockets, explicitly show their type\n"
- " --value When showing properties, only print the value\n"
- " -i --ignore-inhibitors\n"
- " When shutting down or sleeping, ignore inhibitors\n"
- " --kill-who=WHO Who to send signal to\n"
- " -s --signal=SIGNAL Which signal to send\n"
- " --what=RESOURCES Which types of resources to remove\n"
- " --now Start or stop unit in addition to enabling or disabling it\n"
- " --dry-run Only print what would be done\n"
- " -q --quiet Suppress output\n"
- " --wait For (re)start, wait until service stopped again\n"
- " For is-system-running, wait until startup is completed\n"
- " --no-block Do not wait until operation finished\n"
- " --no-wall Don't send wall message before halt/power-off/reboot\n"
- " --no-reload Don't reload daemon after en-/dis-abling unit files\n"
- " --no-legend Do not print a legend (column headers and hints)\n"
- " --no-pager Do not pipe output into a pager\n"
- " --no-ask-password\n"
- " Do not ask for system passwords\n"
- " --global Enable/disable/mask unit files globally\n"
- " --runtime Enable/disable/mask unit files temporarily until next\n"
- " reboot\n"
- " -f --force When enabling unit files, override existing symlinks\n"
- " When shutting down, execute action immediately\n"
- " --preset-mode= Apply only enable, only disable, or all presets\n"
- " --root=PATH Enable/disable/mask unit files in the specified root\n"
- " directory\n"
- " -n --lines=INTEGER Number of journal entries to show\n"
- " -o --output=STRING Change journal output mode (short, short-precise,\n"
+ " -h --help Show this help\n"
+ " --version Show package version\n"
+ " --system Connect to system manager\n"
+ " --user Connect to user service manager\n"
+ " -H --host=[USER@]HOST Operate on remote host\n"
+ " -M --machine=CONTAINER Operate on a local container\n"
+ " -t --type=TYPE List units of a particular type\n"
+ " --state=STATE List units with particular LOAD or SUB or ACTIVE state\n"
+ " --failed Shorcut for --state=failed\n"
+ " -p --property=NAME Show only properties by this name\n"
+ " -a --all Show all properties/all units currently in memory,\n"
+ " including dead/empty ones. To list all units installed\n"
+ " on the system, use 'list-unit-files' instead.\n"
+ " -l --full Don't ellipsize unit names on output\n"
+ " -r --recursive Show unit list of host and local containers\n"
+ " --reverse Show reverse dependencies with 'list-dependencies'\n"
+ " --job-mode=MODE Specify how to deal with already queued jobs, when\n"
+ " queueing a new job\n"
+ " -T --show-transaction When enqueuing a unit job, show full transaction\n"
+ " --show-types When showing sockets, explicitly show their type\n"
+ " --value When showing properties, only print the value\n"
+ " -i --ignore-inhibitors When shutting down or sleeping, ignore inhibitors\n"
+ " --kill-who=WHO Whom to send signal to\n"
+ " -s --signal=SIGNAL Which signal to send\n"
+ " --what=RESOURCES Which types of resources to remove\n"
+ " --now Start or stop unit after enabling or disabling it\n"
+ " --dry-run Only print what would be done\n"
+ " -q --quiet Suppress output\n"
+ " --wait For (re)start, wait until service stopped again\n"
+ " For is-system-running, wait until startup is completed\n"
+ " --no-block Do not wait until operation finished\n"
+ " --no-wall Don't send wall message before halt/power-off/reboot\n"
+ " --no-reload Don't reload daemon after en-/dis-abling unit files\n"
+ " --no-legend Do not print a legend (column headers and hints)\n"
+ " --no-pager Do not pipe output into a pager\n"
+ " --no-ask-password Do not ask for system passwords\n"
+ " --global Enable/disable/mask unit files globally\n"
+ " --runtime Enable/disable/mask unit files temporarily until next\n"
+ " reboot\n"
+ " -f --force When enabling unit files, override existing symlinks\n"
+ " When shutting down, execute action immediately\n"
+ " --preset-mode= Apply only enable, only disable, or all presets\n"
+ " --root=PATH Enable/disable/mask unit files in the specified root\n"
+ " directory\n"
+ " -n --lines=INTEGER Number of journal entries to show\n"
+ " -o --output=STRING Change journal output mode (short, short-precise,\n"
" short-iso, short-iso-precise, short-full,\n"
" short-monotonic, short-unix,\n"
" verbose, export, json, json-pretty, json-sse, cat)\n"
- " --firmware-setup Tell the firmware to show the setup menu on next boot\n"
+ " --firmware-setup Tell the firmware to show the setup menu on next boot\n"
" --boot-loader-menu=TIME\n"
- " Boot into boot loader menu on next boot\n"
+ " Boot into boot loader menu on next boot\n"
" --boot-loader-entry=NAME\n"
- " Boot into a specific boot loader entry on next boot\n"
- " --plain Print unit dependencies as a list instead of a tree\n"
+ " Boot into a specific boot loader entry on next boot\n"
+ " --plain Print unit dependencies as a list instead of a tree\n"
"\nSee the %2$s for details.\n"
, program_invocation_short_name
, link
@@ -8955,73 +9092,76 @@ _pure_ static int action_to_runlevel(void) {
static int systemctl_main(int argc, char *argv[]) {
static const Verb verbs[] = {
{ "list-units", VERB_ANY, VERB_ANY, VERB_DEFAULT|VERB_ONLINE_ONLY, list_units },
- { "list-unit-files", VERB_ANY, VERB_ANY, 0, list_unit_files },
- { "list-sockets", VERB_ANY, VERB_ANY, VERB_ONLINE_ONLY, list_sockets },
- { "list-timers", VERB_ANY, VERB_ANY, VERB_ONLINE_ONLY, list_timers },
- { "list-jobs", VERB_ANY, VERB_ANY, VERB_ONLINE_ONLY, list_jobs },
- { "list-machines", VERB_ANY, VERB_ANY, VERB_ONLINE_ONLY, list_machines },
- { "clear-jobs", VERB_ANY, 1, VERB_ONLINE_ONLY, trivial_method },
- { "cancel", VERB_ANY, VERB_ANY, VERB_ONLINE_ONLY, cancel_job },
- { "start", 2, VERB_ANY, VERB_ONLINE_ONLY, start_unit },
- { "stop", 2, VERB_ANY, VERB_ONLINE_ONLY, start_unit },
- { "condstop", 2, VERB_ANY, VERB_ONLINE_ONLY, start_unit }, /* For compatibility with ALTLinux */
- { "reload", 2, VERB_ANY, VERB_ONLINE_ONLY, start_unit },
- { "restart", 2, VERB_ANY, VERB_ONLINE_ONLY, start_unit },
- { "try-restart", 2, VERB_ANY, VERB_ONLINE_ONLY, start_unit },
- { "reload-or-restart", 2, VERB_ANY, VERB_ONLINE_ONLY, start_unit },
- { "reload-or-try-restart", 2, VERB_ANY, VERB_ONLINE_ONLY, start_unit }, /* For compatibility with old systemctl <= 228 */
- { "try-reload-or-restart", 2, VERB_ANY, VERB_ONLINE_ONLY, start_unit },
- { "force-reload", 2, VERB_ANY, VERB_ONLINE_ONLY, start_unit }, /* For compatibility with SysV */
- { "condreload", 2, VERB_ANY, VERB_ONLINE_ONLY, start_unit }, /* For compatibility with ALTLinux */
- { "condrestart", 2, VERB_ANY, VERB_ONLINE_ONLY, start_unit }, /* For compatibility with RH */
- { "isolate", 2, 2, VERB_ONLINE_ONLY, start_unit },
- { "kill", 2, VERB_ANY, VERB_ONLINE_ONLY, kill_unit },
- { "clean", 2, VERB_ANY, VERB_ONLINE_ONLY, clean_unit },
- { "is-active", 2, VERB_ANY, VERB_ONLINE_ONLY, check_unit_active },
- { "check", 2, VERB_ANY, VERB_ONLINE_ONLY, check_unit_active }, /* deprecated alias of is-active */
- { "is-failed", 2, VERB_ANY, VERB_ONLINE_ONLY, check_unit_failed },
- { "show", VERB_ANY, VERB_ANY, VERB_ONLINE_ONLY, show },
- { "cat", 2, VERB_ANY, VERB_ONLINE_ONLY, cat },
- { "status", VERB_ANY, VERB_ANY, VERB_ONLINE_ONLY, show },
- { "help", VERB_ANY, VERB_ANY, VERB_ONLINE_ONLY, show },
- { "daemon-reload", VERB_ANY, 1, VERB_ONLINE_ONLY, daemon_reload },
- { "daemon-reexec", VERB_ANY, 1, VERB_ONLINE_ONLY, daemon_reload },
- { "show-environment", VERB_ANY, 1, VERB_ONLINE_ONLY, show_environment },
- { "set-environment", 2, VERB_ANY, VERB_ONLINE_ONLY, set_environment },
- { "unset-environment", 2, VERB_ANY, VERB_ONLINE_ONLY, set_environment },
- { "import-environment", VERB_ANY, VERB_ANY, VERB_ONLINE_ONLY, import_environment },
- { "halt", VERB_ANY, 1, VERB_ONLINE_ONLY, start_system_special },
- { "poweroff", VERB_ANY, 1, VERB_ONLINE_ONLY, start_system_special },
- { "reboot", VERB_ANY, 2, VERB_ONLINE_ONLY, start_system_special },
- { "kexec", VERB_ANY, 1, VERB_ONLINE_ONLY, start_system_special },
- { "suspend", VERB_ANY, 1, VERB_ONLINE_ONLY, start_system_special },
- { "hibernate", VERB_ANY, 1, VERB_ONLINE_ONLY, start_system_special },
- { "hybrid-sleep", VERB_ANY, 1, VERB_ONLINE_ONLY, start_system_special },
- { "suspend-then-hibernate",VERB_ANY, 1, VERB_ONLINE_ONLY, start_system_special },
- { "default", VERB_ANY, 1, VERB_ONLINE_ONLY, start_special },
- { "rescue", VERB_ANY, 1, VERB_ONLINE_ONLY, start_system_special },
- { "emergency", VERB_ANY, 1, VERB_ONLINE_ONLY, start_system_special },
- { "exit", VERB_ANY, 2, VERB_ONLINE_ONLY, start_special },
- { "reset-failed", VERB_ANY, VERB_ANY, VERB_ONLINE_ONLY, reset_failed },
- { "enable", 2, VERB_ANY, 0, enable_unit },
- { "disable", 2, VERB_ANY, 0, enable_unit },
- { "is-enabled", 2, VERB_ANY, 0, unit_is_enabled },
- { "reenable", 2, VERB_ANY, 0, enable_unit },
- { "preset", 2, VERB_ANY, 0, enable_unit },
- { "preset-all", VERB_ANY, 1, 0, preset_all },
- { "mask", 2, VERB_ANY, 0, enable_unit },
- { "unmask", 2, VERB_ANY, 0, enable_unit },
- { "link", 2, VERB_ANY, 0, enable_unit },
- { "revert", 2, VERB_ANY, 0, enable_unit },
- { "switch-root", 2, VERB_ANY, VERB_ONLINE_ONLY, switch_root },
- { "list-dependencies", VERB_ANY, 2, VERB_ONLINE_ONLY, list_dependencies },
- { "set-default", 2, 2, 0, set_default },
- { "get-default", VERB_ANY, 1, 0, get_default },
- { "set-property", 3, VERB_ANY, VERB_ONLINE_ONLY, set_property },
- { "is-system-running", VERB_ANY, 1, 0, is_system_running },
- { "add-wants", 3, VERB_ANY, 0, add_dependency },
- { "add-requires", 3, VERB_ANY, 0, add_dependency },
- { "edit", 2, VERB_ANY, VERB_ONLINE_ONLY, edit },
+ { "list-unit-files", VERB_ANY, VERB_ANY, 0, list_unit_files },
+ { "list-sockets", VERB_ANY, VERB_ANY, VERB_ONLINE_ONLY, list_sockets },
+ { "list-timers", VERB_ANY, VERB_ANY, VERB_ONLINE_ONLY, list_timers },
+ { "list-jobs", VERB_ANY, VERB_ANY, VERB_ONLINE_ONLY, list_jobs },
+ { "list-machines", VERB_ANY, VERB_ANY, VERB_ONLINE_ONLY, list_machines },
+ { "clear-jobs", VERB_ANY, 1, VERB_ONLINE_ONLY, trivial_method },
+ { "cancel", VERB_ANY, VERB_ANY, VERB_ONLINE_ONLY, cancel_job },
+ { "start", 2, VERB_ANY, VERB_ONLINE_ONLY, start_unit },
+ { "stop", 2, VERB_ANY, VERB_ONLINE_ONLY, start_unit },
+ { "condstop", 2, VERB_ANY, VERB_ONLINE_ONLY, start_unit }, /* For compatibility with ALTLinux */
+ { "reload", 2, VERB_ANY, VERB_ONLINE_ONLY, start_unit },
+ { "restart", 2, VERB_ANY, VERB_ONLINE_ONLY, start_unit },
+ { "try-restart", 2, VERB_ANY, VERB_ONLINE_ONLY, start_unit },
+ { "reload-or-restart", 2, VERB_ANY, VERB_ONLINE_ONLY, start_unit },
+ { "reload-or-try-restart", 2, VERB_ANY, VERB_ONLINE_ONLY, start_unit }, /* For compatibility with old systemctl <= 228 */
+ { "try-reload-or-restart", 2, VERB_ANY, VERB_ONLINE_ONLY, start_unit },
+ { "force-reload", 2, VERB_ANY, VERB_ONLINE_ONLY, start_unit }, /* For compatibility with SysV */
+ { "condreload", 2, VERB_ANY, VERB_ONLINE_ONLY, start_unit }, /* For compatibility with ALTLinux */
+ { "condrestart", 2, VERB_ANY, VERB_ONLINE_ONLY, start_unit }, /* For compatibility with RH */
+ { "isolate", 2, 2, VERB_ONLINE_ONLY, start_unit },
+ { "kill", 2, VERB_ANY, VERB_ONLINE_ONLY, kill_unit },
+ { "clean", 2, VERB_ANY, VERB_ONLINE_ONLY, clean_unit },
+ { "is-active", 2, VERB_ANY, VERB_ONLINE_ONLY, check_unit_active },
+ { "check", 2, VERB_ANY, VERB_ONLINE_ONLY, check_unit_active }, /* deprecated alias of is-active */
+ { "is-failed", 2, VERB_ANY, VERB_ONLINE_ONLY, check_unit_failed },
+ { "show", VERB_ANY, VERB_ANY, VERB_ONLINE_ONLY, show },
+ { "cat", 2, VERB_ANY, VERB_ONLINE_ONLY, cat },
+ { "status", VERB_ANY, VERB_ANY, VERB_ONLINE_ONLY, show },
+ { "help", VERB_ANY, VERB_ANY, VERB_ONLINE_ONLY, show },
+ { "daemon-reload", VERB_ANY, 1, VERB_ONLINE_ONLY, daemon_reload },
+ { "daemon-reexec", VERB_ANY, 1, VERB_ONLINE_ONLY, daemon_reload },
+ { "log-level", VERB_ANY, 2, 0, log_level },
+ { "log-target", VERB_ANY, 2, 0, log_target },
+ { "service-watchdogs", VERB_ANY, 2, 0, service_watchdogs },
+ { "show-environment", VERB_ANY, 1, VERB_ONLINE_ONLY, show_environment },
+ { "set-environment", 2, VERB_ANY, VERB_ONLINE_ONLY, set_environment },
+ { "unset-environment", 2, VERB_ANY, VERB_ONLINE_ONLY, set_environment },
+ { "import-environment", VERB_ANY, VERB_ANY, VERB_ONLINE_ONLY, import_environment },
+ { "halt", VERB_ANY, 1, VERB_ONLINE_ONLY, start_system_special },
+ { "poweroff", VERB_ANY, 1, VERB_ONLINE_ONLY, start_system_special },
+ { "reboot", VERB_ANY, 2, VERB_ONLINE_ONLY, start_system_special },
+ { "kexec", VERB_ANY, 1, VERB_ONLINE_ONLY, start_system_special },
+ { "suspend", VERB_ANY, 1, VERB_ONLINE_ONLY, start_system_special },
+ { "hibernate", VERB_ANY, 1, VERB_ONLINE_ONLY, start_system_special },
+ { "hybrid-sleep", VERB_ANY, 1, VERB_ONLINE_ONLY, start_system_special },
+ { "suspend-then-hibernate",VERB_ANY, 1, VERB_ONLINE_ONLY, start_system_special },
+ { "default", VERB_ANY, 1, VERB_ONLINE_ONLY, start_special },
+ { "rescue", VERB_ANY, 1, VERB_ONLINE_ONLY, start_system_special },
+ { "emergency", VERB_ANY, 1, VERB_ONLINE_ONLY, start_system_special },
+ { "exit", VERB_ANY, 2, VERB_ONLINE_ONLY, start_special },
+ { "reset-failed", VERB_ANY, VERB_ANY, VERB_ONLINE_ONLY, reset_failed },
+ { "enable", 2, VERB_ANY, 0, enable_unit },
+ { "disable", 2, VERB_ANY, 0, enable_unit },
+ { "is-enabled", 2, VERB_ANY, 0, unit_is_enabled },
+ { "reenable", 2, VERB_ANY, 0, enable_unit },
+ { "preset", 2, VERB_ANY, 0, enable_unit },
+ { "preset-all", VERB_ANY, 1, 0, preset_all },
+ { "mask", 2, VERB_ANY, 0, enable_unit },
+ { "unmask", 2, VERB_ANY, 0, enable_unit },
+ { "link", 2, VERB_ANY, 0, enable_unit },
+ { "revert", 2, VERB_ANY, 0, enable_unit },
+ { "switch-root", 2, VERB_ANY, VERB_ONLINE_ONLY, switch_root },
+ { "list-dependencies", VERB_ANY, 2, VERB_ONLINE_ONLY, list_dependencies },
+ { "set-default", 2, 2, 0, set_default },
+ { "get-default", VERB_ANY, 1, 0, get_default },
+ { "set-property", 3, VERB_ANY, VERB_ONLINE_ONLY, set_property },
+ { "is-system-running", VERB_ANY, 1, 0, is_system_running },
+ { "add-wants", 3, VERB_ANY, 0, add_dependency },
+ { "add-requires", 3, VERB_ANY, 0, add_dependency },
+ { "edit", 2, VERB_ANY, VERB_ONLINE_ONLY, edit },
{}
};