[PATCH] Rely on the "Resuming" signal only on a system with systemd
Imran Haider
imran1008 at gmail.com
Sun May 12 05:49:09 PDT 2013
The notify-upower.sh script is only executed on a system with systemd. For
distributions that use logind without a full fledged systemd, this script
will not get executed and so upower would not know that it has resumed.
This change fixes an issue where the system goes to sleep only once and
does not sleep until upowerd is restarted.
---
src/linux/up-backend.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/linux/up-backend.c b/src/linux/up-backend.c
index b9f75f5..e3c6c0a 100644
--- a/src/linux/up-backend.c
+++ b/src/linux/up-backend.c
@@ -614,9 +614,11 @@ up_backend_get_hibernate_command (UpBackend *backend)
gboolean
up_backend_emits_resuming (UpBackend *backend)
{
+#ifdef HAVE_SYSTEMD
if (LOGIND_AVAILABLE())
return TRUE;
else
+#endif
return FALSE;
}
#endif
--
1.8.2.2
More information about the devkit-devel
mailing list