summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2015-08-23 14:54:39 +0200
committerAndy Wingo <wingo@pobox.com>2015-08-23 14:54:39 +0200
commitef2aa93b7a4c742ae74496566344fd71e411fa72 (patch)
tree77a378fd74d1e7ee0c602d7a853a1a5b85076903 /Makefile.am
parent06ca7594edc2bf54a32f0fe86fc65976c70f1f11 (diff)
Handle suspend/hibernate/hybrid-suspend/shutdown/reboot directly
* configure.ac: Get paths of halt and reboot. * Makefile.am (systemsleepdir, systemshutdowndir): New variables. Look in them for hooks to run. * src/login/logind-action.c: Inline the salient bits from systemd's system-sleep.c here. * src/login/logind-dbus.c (execute_shutdown_or_sleep): Call our own shutdown_or_sleep helper instead of invoking a systemd method. * src/login/logind.h: Declare shutdown_or_sleep.
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am7
1 files changed, 6 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index 8012620fd..bb4885d47 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -54,6 +54,8 @@ bashcompletiondir=@bashcompletiondir@
zshcompletiondir=@zshcompletiondir@
varlogdir=$(localstatedir)/log
elogindstatedir=$(localstatedir)/lib/elogind
+systemsleepdir=$(pkglibexecdir)/sleep.d
+systemshutdowndir=$(pkglibexecdir)/shutdown.d
udevrulesdir=@udevrulesdir@
udevbindir=@udevbindir@
@@ -124,7 +126,10 @@ AM_CPPFLAGS = \
-DUSER_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/user\" \
-DUSER_DATA_UNIT_PATH=\"$(userunitdir)\" \
-DROOTPREFIX=\"$(rootprefix)\" \
- -DPOLKIT_AGENT_BINARY_PATH=\"$(bindir)/pkttyagent\" \
+ -DSYSTEM_SLEEP_PATH=\"$(systemsleepdir)\" \
+ -DSYSTEM_SHUTDOWN_PATH=\"$(systemshutdowndir)\" \
+ -DHALT=\"$(HALT)\" \
+ -DREBOOT=\"$(REBOOT)\" \
-DKEXEC=\"$(KEXEC)\" \
-DLIBDIR=\"$(libdir)\" \
-DTEST_DIR=\"$(abs_top_srcdir)/test\" \