[Sugar-devel] [PATCH] use ConsoleKit instead of HAL for

Michael Stone michael at laptop.org
Wed Apr 21 01:19:54 EDT 2010


Paul wrote:
> michael wrote:
> > Paul wrote:
> > > james wrote:
> > >  > On Tue, Apr 20, 2010 at 07:55:45PM -0400, Chris Ball wrote:
> > >  > > Hi James/Sascha,
> > >  > >    > Reviewed-by: James Cameron <quozl at laptop.org>
> > >  > > Did you test on XO-1 or XO-1.5?  I'm curious how much of a backwards-
> > >  > > compatibility break this is.
> > >  > 
> > >  > No, I only did a code review and cross-check against ConsoleKit API
> > >  > documentation.
> > >  > 
> > >  > However, I've just applied the patch on os119 on XO-1.5, restarted Sugar
> > >  > and tested Restart and Shutdown options, and they function correctly.
> > >  > Restart causes a UL screen and reboot.  Shutdown causes a UL screen and
> > >  > power off.
> > > 
> > > so, can someone tell me (gently) why either of these techniques
> > > is better than simply invoking /bin/reboot or /bin/shutdown? 
> > > (other than the fact that those will work even if hal isn't
> > > running?)
> > 
> > Sascha, Paul,
> > 
> > For what it's worth, I would prefer to see a patch which simply called "sudo
> > /sbin/shutdown -h now" and "sudo /sbin/shutdown -r now". I don't see the value
> > that D-Bus and ConsoleKit are providing here.
>
> that would certainly solve OLPC's problem, but i suspect sugar
> wants something more portable than that in the codebase.

The path "/sbin/shutdown" is mandated by the FHS and supported by all three
major BSDs. The suggested commandline options are also quite portable. 

It is, nevertheless, true that the authentication details vary from platform to
platform. I just don't think they vary enough to be worth making more use of
D-Bus and ConsoleKit.

Michael

P.S. - I might feel differently if I knew how to make D-Bus and ConsoleKit work
sanely with chroots, which I care about deeply for purposes of testing. 

I know how to make the /sbin/shutdown approach work sanely with chroots.


More information about the Sugar-devel mailing list