]> err.no Git - systemd/commitdiff
sleep: print nice messages right before and right after system hibernate/sleep
authorLennart Poettering <lennart@poettering.net>
Wed, 30 May 2012 13:04:39 +0000 (15:04 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 30 May 2012 13:04:39 +0000 (15:04 +0200)
TODO
src/sleep/sleep.c

diff --git a/TODO b/TODO
index f4d3c63464b4d26fa265ca426761892bc1c5e849..a9e38d34730f3f07dac358511d5e455d1da9f98b 100644 (file)
--- a/TODO
+++ b/TODO
@@ -36,12 +36,6 @@ Features:
 
 * parse kernel cmdline option for capability bset
 
-* logind: listen to power-button events
-  - run poweroff if no session is active
-  - console session should beep when we refuse to poweroff
-  - graphical sessions will show a dialog, like they do already today
-  - use udev to tag input devices we want to subscribe to
-
 * journalctl /dev/sda, journalctl /usr/bin/httpd, journalctl --device=b12:8 (--device=n12, --device=+usb:1-1)
 
 * make use of /sys/power/wake_lock in inhibitors
index 7062dc242ff0bb1b2b7e6c56d28ffd6bab9b158c..941edc303dfe84046e0a8e085c6c24ba58cc2dad 100644 (file)
@@ -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);