guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: elogind status


From: Andy Wingo
Subject: Re: elogind status
Date: Thu, 27 Aug 2015 16:20:24 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

On Thu 27 Aug 2015 15:58, Andy Wingo <address@hidden> writes:

> On Thu 27 Aug 2015 15:25, address@hidden (Ludovic Courtès) writes:
>
>> Andy Wingo <address@hidden> skribis:
>>
>>> I will keep this patch stack up to date at wip-pam-elogind.  On that
>>> branch there's an update to a new elogind that includes systemd's code
>>> to suspend/hibernate/hybrid-sleep the system, as well as new code to
>>> implement the poweroff/halt/reboot things.
>>
>> How does poweroff/halt/reboot works?
>>
>> On GuixSD, ‘halt’ & co. make an RPC to dmd so that it terminates all the
>> services (including file system mounts) in the right order.
>>
>> Anyway, good stuff!
>
> Currently poweroff and halt both invoke the "halt" executable, whose
> full path is captured at build-time if available and otherwise searched
> in the path.  In Guix the full path is captured.  Poweroff and halt are
> the same on modern systems, aren't they?  Dunno.  Reboot invokes reboot,
> captured in the same way, and the same for kexec.  Anyway for Guix this
> should do the right thing, no?  It waits for the exec'd program to
> return and checks the error code.  I guess the actual halt is async
> though of course.
>
> Suspend/hibernate/hybrid-sleep all write to /sys/power/disk and
> /sys/power/state.

Forgot to add the link.  The suspend code is from systemd, and uses a
config file to configure what to do for various sleep states.  The
halt/reboot/kexec code is mine.  For all of these, upstream systemd does
an RPC to systemd to run special units or targets.  The sleep code ends
up being the same but the halt code is different.

   
https://github.com/andywingo/elogind/commit/ef2aa93b7a4c742ae74496566344fd71e411fa72
   http://www.freedesktop.org/software/systemd/man/systemd-sleep.conf.html
   http://www.freedesktop.org/software/systemd/man/systemd-sleep.html

Andy



reply via email to

[Prev in Thread] Current Thread [Next in Thread]