On Saturday, 16 November 2019 09:34:02 GMT n952162 wrote:
> On 11/13/19 09:55, Mick wrote:
> > On Wednesday, 13 November 2019 06:48:11 GMT n952162 wrote:
> >> I've reinstalled gentoo from the gentoo repository and now my power
> >> button doesn't do a shutdown anymore.  What do I have to do to have it
> >> issue a shutdown?  This is an openrc system.
> >> 
> >> I have this, but it doesn't work:
> >> 
> >> $ cat  /etc/acpi/events/powerbtn
> >> event=button[ /]power.*
> >> action=/sbin/poweroff
> 
> Okay, I'm a bit further.
> 
> I have that file as well, but it doesn't do anything because another
> script in that same directory, "default", has this:
> 
> event=.*
> action=/etc/acpi/default.sh %e
> 
> //etc/acpi/default.sh /invokes /actions/powerbtn.sh/ which checks if the
> init program (process 1) is running with the name "openrc-init". 
> Otherwise, it's not interested.
> 
> Unfortunately, I have:
> 
> $ ps -p 1 -o comm=
> init
> 
> Question: when does the init program run under the name openrc-init?

It is not simply a matter of different names, but of different binaries.  As 
far as I understand it, the /sbin/init of sys-apps/sysvinit is used by openrc 
unless you have modified your system to use openrc-init (a different binary to 
/sbin/init) as explained here:

https://wiki.gentoo.org/wiki/OpenRC/openrc-init

I may have this wrong of course, but hopefully a more learned participant will 
chime in soon to explain it better to us.  :-)

-- 
Regards,

Mick

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to