[ConsoleKit] extend ConsoleKit to support fast reboot on OpenSolaris x86

Jedy Wang Jedy.Wang at Sun.COM
Mon Oct 26 00:35:25 PDT 2009


Hi all,

I am currently working on this for OpenSolaris. But it's hard to pass
multi parameters by using
check_polkit_permissions/check_rbac_permissions because
AuthorizedCallback does not take any argument. So I modified
    RebootIntoOperatingSystem(in string os_id, boolean make_default)
a little. The new interface I use in my code is
    RebootWithParameters(in string parameter)
The parameter should be something like "id:1 default:true".

By using this way and extending AuthorizedCallback to take a void *
argument, I can use check_polkit_permissions/check_rbac_permissions to
check privilege before anything is done for RebootWithParameters.

Regards,

Jedy
On Wed, 2009-09-09 at 11:46 -0400, David Zeuthen wrote:
> Hi again,
> 
> Thinking more about this, what we probably want is a method on the CK
> Manager object that will return an array of possible OSes that the
> user can reboot to
> 
>  GetAvailableOperatingSystems(out array<OperatingSystem>);
> 
> with something like
> 
>  struct OperatingSystem
>  {
>    string os_id;
>    string os_vendor;
>    string os_version;
>    string os_name;
>    boolean default;
>  };
> 
> where os_vendor ('fedora', 'ubuntu', 'kubuntu', 'suse', 'sun',
> 'microsoft'), os_version ('11', '6.06', 'Vista', '7', ...) and os_name
> ('Fedora 11', 'Ubunty Dapper', 'Microsoft XP', ...) being defined in
> the CK docs. And 'id' would be an opaque identifier (with few
> guarantees - might change after a reboot / reconfiguration) that is
> supposed to be used with
> 
>  RebootIntoOperatingSystem(in string os_id, boolean make_default);
> 
> or something.
> 
> That way, the GNOME shutdown/reboot dialog can be smart about things
> and perhaps offer a combo box only if more than one OS is available.
> And CK can be smart and pass the right flags to reboot(8) to use e.g.
> fastboot or not. And OS vendors can plug in various code to parse
> /etc/grub.conf or whatever. Or leave it empty if they don't care.
> 
>      David
> _______________________________________________
> ConsoleKit mailing list
> ConsoleKit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/consolekit




More information about the ConsoleKit mailing list