summaryrefslogtreecommitdiff
path: root/src/core/shutdown.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-05-05 02:06:58 +0200
committerLennart Poettering <lennart@poettering.net>2012-05-08 13:54:23 +0200
commit6edd7d0a09171ea5ae8e01b7b1cbcb0bdfbfeb16 (patch)
tree85a09e06fd5dfc98cb198fafb9a33b70e79a4c63 /src/core/shutdown.c
parent4943c1c94ba751c98763f4232b4350481b22c90a (diff)
sleep: implement suspend/hibernate as first class targets
Diffstat (limited to 'src/core/shutdown.c')
-rw-r--r--src/core/shutdown.c6
1 files changed, 5 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. */