chiark / gitweb /
Handle suspend, shutdown, reboot, etc within elogind
authorSven Eden <yamakuzure@gmx.net>
Wed, 1 Feb 2017 07:48:13 +0000 (08:48 +0100)
committerSven Eden <yamakuzure@gmx.net>
Tue, 14 Mar 2017 09:23:13 +0000 (10:23 +0100)
commite19b8719a54c343372e16b462c27f1e84c987b85
treec282d4e5d33330d0b6516f5d2274f053b7abe31f
parent059696ac014da265ee2d1b062cd0dc7bee3d2001
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.
Makefile.am
src/basic/special.h
src/basic/util.c
src/basic/util.h
src/login/logind-action.c
src/login/logind-action.h
src/login/logind-dbus.c
src/login/logind.c
src/login/logind.h