1 |
On Saturday, 16 November 2019 09:34:02 GMT n952162 wrote: |
2 |
> On 11/13/19 09:55, Mick wrote: |
3 |
> > On Wednesday, 13 November 2019 06:48:11 GMT n952162 wrote: |
4 |
> >> I've reinstalled gentoo from the gentoo repository and now my power |
5 |
> >> button doesn't do a shutdown anymore. What do I have to do to have it |
6 |
> >> issue a shutdown? This is an openrc system. |
7 |
> >> |
8 |
> >> I have this, but it doesn't work: |
9 |
> >> |
10 |
> >> $ cat /etc/acpi/events/powerbtn |
11 |
> >> event=button[ /]power.* |
12 |
> >> action=/sbin/poweroff |
13 |
> |
14 |
> Okay, I'm a bit further. |
15 |
> |
16 |
> I have that file as well, but it doesn't do anything because another |
17 |
> script in that same directory, "default", has this: |
18 |
> |
19 |
> event=.* |
20 |
> action=/etc/acpi/default.sh %e |
21 |
> |
22 |
> //etc/acpi/default.sh /invokes /actions/powerbtn.sh/ which checks if the |
23 |
> init program (process 1) is running with the name "openrc-init". |
24 |
> Otherwise, it's not interested. |
25 |
> |
26 |
> Unfortunately, I have: |
27 |
> |
28 |
> $ ps -p 1 -o comm= |
29 |
> init |
30 |
> |
31 |
> Question: when does the init program run under the name openrc-init? |
32 |
|
33 |
It is not simply a matter of different names, but of different binaries. As |
34 |
far as I understand it, the /sbin/init of sys-apps/sysvinit is used by openrc |
35 |
unless you have modified your system to use openrc-init (a different binary to |
36 |
/sbin/init) as explained here: |
37 |
|
38 |
https://wiki.gentoo.org/wiki/OpenRC/openrc-init |
39 |
|
40 |
I may have this wrong of course, but hopefully a more learned participant will |
41 |
chime in soon to explain it better to us. :-) |
42 |
|
43 |
-- |
44 |
Regards, |
45 |
|
46 |
Mick |