diff options
author | Sven Eden <yamakuzure@gmx.net> | 2017-02-01 08:48:13 +0100 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-03-14 10:23:13 +0100 |
commit | e19b8719a54c343372e16b462c27f1e84c987b85 (patch) | |
tree | c282d4e5d33330d0b6516f5d2274f053b7abe31f /Makefile.am | |
parent | 059696ac014da265ee2d1b062cd0dc7bee3d2001 (diff) |
Handle suspend, shutdown, reboot, etc within elogind
Since we are catching the keys, we might as well just do
suspend/reboot/etc handling here.
* 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
sleep/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-action.h: Declare shutdown_or_sleep.
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am index d84cfd6f2..6e8805898 100644 --- a/Makefile.am +++ b/Makefile.am @@ -52,6 +52,8 @@ pkgconfiglibdir=$(libdir)/pkgconfig polkitpolicydir=$(datadir)/polkit-1/actions bashcompletiondir=@bashcompletiondir@ zshcompletiondir=@zshcompletiondir@ +systemsleepdir=$(pkglibexecdir)/sleep.d +systemshutdowndir=$(pkglibexecdir)/shutdown.d # Our own, non-special dirs pkgsysconfdir=$(sysconfdir)/elogind @@ -119,6 +121,10 @@ AM_CPPFLAGS = \ -DROOTPREFIX=\"$(rootprefix)\" \ -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\" \ -DPOLKIT_AGENT_BINARY_PATH=\"$(bindir)/pkttyagent\" \ + -DSYSTEM_SLEEP_PATH=\"$(systemsleepdir)\" \ + -DSYSTEM_SHUTDOWN_PATH=\"$(systemshutdowndir)\" \ + -DHALT=\"$(HALT)\" \ + -DREBOOT=\"$(REBOOT)\" \ -DKEXEC=\"$(KEXEC)\" \ -DLIBDIR=\"$(libdir)\" \ -DROOTLIBDIR=\"$(rootlibdir)\" \ |