chiark / gitweb /
Handle suspend/hibernate/hybrid-suspend/shutdown/reboot directly
authorAndy Wingo <wingo@pobox.com>
Sun, 23 Aug 2015 12:54:39 +0000 (14:54 +0200)
committerAndy Wingo <wingo@pobox.com>
Sun, 23 Aug 2015 12:54:39 +0000 (14:54 +0200)
commitef2aa93b7a4c742ae74496566344fd71e411fa72
tree77a378fd74d1e7ee0c602d7a853a1a5b85076903
parent06ca7594edc2bf54a32f0fe86fc65976c70f1f11
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.
Makefile.am
configure.ac
src/login/logind-action.c
src/login/logind-dbus.c
src/login/logind.h