diff options
author | Lennart Poettering <lennart@poettering.net> | 2012-05-30 15:04:39 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2012-05-30 15:04:39 +0200 |
commit | eb2672893108e14d50bd79b7fc714b75c5427c0b (patch) | |
tree | be8ca9937bee4f518495bbacf194b9ab4f10e2b9 /src/sleep | |
parent | 069cfc85f876bb6966cb5a9bbe0235f5064622cd (diff) |
sleep: print nice messages right before and right after system hibernate/sleep
Diffstat (limited to 'src/sleep')
-rw-r--r-- | src/sleep/sleep.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c index 7062dc242f..941edc303d 100644 --- a/src/sleep/sleep.c +++ b/src/sleep/sleep.c @@ -65,12 +65,22 @@ int main(int argc, char *argv[]) { arguments[3] = NULL; execute_directory(SYSTEMD_SLEEP_BINARY_PATH, NULL, arguments); + if (streq(argv[1], "suspend")) + log_info("Suspending system..."); + else + log_info("Hibernating system..."); + fputs(verb, f); fputc('\n', f); fflush(f); r = ferror(f) ? -errno : 0; + if (streq(argv[1], "suspend")) + log_info("System resumed."); + else + log_info("System thawed."); + arguments[1] = (char*) "post"; execute_directory(SYSTEMD_SLEEP_BINARY_PATH, NULL, arguments); |