epoptes team mailing list archive
-
epoptes team
-
Mailing list archive
-
Message #00583
[Merge] lp:~oiteam/epoptes/systemd-logind-shutdown into lp:epoptes
Laércio de Sousa has proposed merging lp:~oiteam/epoptes/systemd-logind-shutdown into lp:epoptes.
Requested reviews:
Epoptes Developers (epoptes)
For more details, see:
https://code.launchpad.net/~oiteam/epoptes/systemd-logind-shutdown/+merge/193897
Add systemd-logind DBus calls for reboot and shutdown, needed for distros that have completed transition from ConsoleKit to systemd-logind.
--
https://code.launchpad.net/~oiteam/epoptes/systemd-logind-shutdown/+merge/193897
Your team Epoptes Developers is requested to review the proposed merge of lp:~oiteam/epoptes/systemd-logind-shutdown into lp:epoptes.
=== modified file 'epoptes-client/endsession'
--- epoptes-client/endsession 2013-10-02 02:27:41 +0000
+++ epoptes-client/endsession 2013-11-05 10:35:51 +0000
@@ -97,7 +97,11 @@
--dest=org.freedesktop.PowerManagement /org/freedesktop/PowerManagement \
org.freedesktop.PowerManagement.Reboot 2>&1 && return
- # ConsoleKit is the last resort since it doesn't allow inhibiting
+ # ConsoleKit/systemd-logind is the last resort since it doesn't allow inhibiting
+ dbus-send --system --type=method_call --print-reply --reply-timeout=2000 \
+ --dest=org.freedesktop.login1 /org/freedesktop/login1 \
+ org.freedesktop.login1.Manager.Reboot 2>&1 && return
+
dbus-send --system --type=method_call --print-reply --reply-timeout=2000 \
--dest=org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager \
org.freedesktop.ConsoleKit.Manager.Restart 2>&1 && return
@@ -134,7 +138,11 @@
--dest=org.freedesktop.PowerManagement /org/freedesktop/PowerManagement \
org.freedesktop.PowerManagement.Shutdown && return
- # ConsoleKit is the last resort since it doesn't allow inhibiting
+ # ConsoleKit/systemd-logind is the last resort since it doesn't allow inhibiting
+ dbus-send --system --type=method_call --print-reply --reply-timeout=2000 \
+ --dest=org.freedesktop.login1 /org/freedesktop/login1 \
+ org.freedesktop.login1.Manager.PowerOff 2>&1 && return
+
dbus-send --system --type=method_call --print-reply --reply-timeout=2000 \
--dest=org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager \
org.freedesktop.ConsoleKit.Manager.Stop 2>&1 && return
Follow ups