diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/shutdown.c | 6 | ||||
-rw-r--r-- | src/core/special.h | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/core/shutdown.c b/src/core/shutdown.c index 2494bb86a1..a8dfe2614f 100644 --- a/src/core/shutdown.c +++ b/src/core/shutdown.c @@ -309,6 +309,7 @@ int main(int argc, char *argv[]) { unsigned retries; bool need_umount = true, need_swapoff = true, need_loop_detach = true, need_dm_detach = true; bool killed_everbody = false, in_container, use_watchdog = false; + char *arguments[3]; log_parse_environment(); log_set_target(LOG_TARGET_CONSOLE); /* syslog will die if not gone yet */ @@ -442,7 +443,10 @@ int main(int argc, char *argv[]) { if (retries >= FINALIZE_ATTEMPTS) log_error("Too many iterations, giving up."); - execute_directory(SYSTEM_SHUTDOWN_PATH, NULL, NULL); + arguments[0] = NULL; + arguments[1] = argv[1]; + arguments[2] = NULL; + execute_directory(SYSTEM_SHUTDOWN_PATH, NULL, arguments); /* If we are in a container, just exit, this will kill our * container for good. */ diff --git a/src/core/special.h b/src/core/special.h index 2db4711c2e..bc9b330ffb 100644 --- a/src/core/special.h +++ b/src/core/special.h @@ -36,6 +36,8 @@ #define SPECIAL_REBOOT_TARGET "reboot.target" #define SPECIAL_KEXEC_TARGET "kexec.target" #define SPECIAL_EXIT_TARGET "exit.target" +#define SPECIAL_SUSPEND_TARGET "suspend.target" +#define SPECIAL_HIBERNATE_TARGET "hibernate.target" /* Special boot targets */ #define SPECIAL_RESCUE_TARGET "rescue.target" |