On Thu, 2009-09-03 at 09:02 +0200, Joerg Barfurth wrote: > Jedy Wang schrieb: > > > For example, ConsoleKit DBus service daemon currently provides 2 DBus > > methods, Stop and Restart, to shutdown and reboot the system. We can add > > 2 new DBus methods, FastRestart and ColdRestart, to support fast reboot > > and reboot to prom. > > > > I don't think a multitude of platform-specific methods is the best > approach to add platform-dependent specializations to an essentially > platform-independent interface. If you later want to add support for > boot-to-specified-BE, you'd need more methods. > > A better approach could be a pair of getBootOptions/setBootOptions > methods or an added bootOptions parameter for the restart and > shutdown(?) methods, which allow passing a set of named parameters (as a > map/dictionary). Through getBootOptions (or a separate method) it should > be possible to query supported options. > > I'd assume such a generic approach is more palatable for upstream.
This is also an option. When we discuss this problem with the community, I will list this option with others. > > > I do not understand what you mean by "These interfaces look a bit out of > > place on ConsoleKit"? > > > > ConsoleKit manages Seats and Sessions and their association to devices > and X servers. Interfaces for system power control are really something > different and would really be better offered by a separate power > management service. Code to restart/shutdown the system is already in ConsoleKit before Brian tried to port it. And if it should be moved from ConsoleKit to another power management service is beyond the discussion of this case. Regards, Jedy