[Sugar-devel] [PATCH sugar v2] use ConsoleKit instead of HAL for shutdown/reboot
Sascha Silbe
sascha-pgp at silbe.org
Sat Jan 22 07:34:28 EST 2011
HAL is dead, ConsoleKit now handles shutdown / reboot.
Tested on XO-1.5 running Debian Squeeze with consolekit 0.4.1-4.
Signed-off-by: Sascha Silbe <sascha-pgp at silbe.org>
---
v1->v2: Rebased on mainline/master
src/jarabe/model/session.py | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/jarabe/model/session.py b/src/jarabe/model/session.py
index c6409fb..9b277ff 100644
--- a/src/jarabe/model/session.py
+++ b/src/jarabe/model/session.py
@@ -55,15 +55,15 @@ class SessionManager(session.SessionManager):
elif self._logout_mode != self.MODE_LOGOUT:
try:
bus = dbus.SystemBus()
- proxy = bus.get_object('org.freedesktop.Hal',
- '/org/freedesktop/Hal/devices/computer')
+ proxy = bus.get_object('org.freedesktop.ConsoleKit',
+ '/org/freedesktop/ConsoleKit/Manager')
pm = dbus.Interface(proxy,
- 'org.freedesktop.Hal.Device.SystemPowerManagement')
+ 'org.freedesktop.ConsoleKit.Manager')
if self._logout_mode == self.MODE_SHUTDOWN:
- pm.Shutdown()
+ pm.Stop()
elif self._logout_mode == self.MODE_REBOOT:
- pm.Reboot()
+ pm.Restart()
except:
logging.exception('Can not stop sugar')
self.session.cancel_shutdown()
--
1.7.2.3
More information about the Sugar-devel
mailing list