Re: How to trap ctrl-alt-del?

2016-12-05 Thread Jean Louis
Thank you. How could I forget simple permissions? Now I am using it that way. On Thu, Dec 01, 2016 at 06:15:48PM +, Laurent Bercot wrote: > > The s6-poweroff is for root user, and I have users who wish to > > poweroff, and I don't want to give them sudo rights to power off the > > computer.

Re: How to trap ctrl-alt-del?

2016-12-01 Thread Jean Louis
On Thu, Dec 01, 2016 at 06:15:48PM +, Laurent Bercot wrote: > > The s6-poweroff is for root user, and I have users who wish to > > poweroff, and I don't want to give them sudo rights to power off the > > computer. That is why I am searching for simple solution. > > Create a "poweroff" group.

Re: How to trap ctrl-alt-del?

2016-12-01 Thread Laurent Bercot
The s6-poweroff is for root user, and I have users who wish to poweroff, and I don't want to give them sudo rights to power off the computer. That is why I am searching for simple solution. Create a "poweroff" group. Add all the users you want to that group. chown root:poweroff

Re: How to trap ctrl-alt-del?

2016-12-01 Thread Jean Louis
OK that is correct, I need to configure acpid, for power off. And I will leave defaults of reboot with ctrl-alt-del The s6-poweroff is for root user, and I have users who wish to poweroff, and I don't want to give them sudo rights to power off the computer. That is why I am searching for simple

Re: How to trap ctrl-alt-del?

2016-12-01 Thread Casper Ti. Vector
Setting `kernel.ctrl-alt-del' to 0 just makes C-A-D send SIGINT to PID 1 (instead of triggering a hard reboot). If you want to make SIGINT trigger a grace shutdown, you can modify the SIGINT handler in the `service/.s6-svscan' directory. But I personally do not think changing signal semantics

Re: How to trap ctrl-alt-del?

2016-12-01 Thread Jean Louis
Thank you much. I have figured out that I had to change kernel parameter to be: kernel.ctrl-alt-del = 0 and now I see that ctrl-alt-del reboots, it is by default. What exactly should I change or do, that is simply does power off? On Sat, Nov 26, 2016 at 10:36:22PM +0800, Casper Ti. Vector

Re: How to trap ctrl-alt-del?

2016-11-28 Thread Casper Ti. Vector
The mail archive (archive.cgi) seems to be still down. The git interface (cgit.cgi) is working though... On Fri, Nov 25, 2016 at 04:26:55PM +0800, Casper Ti. Vector wrote: > The second is an alternative link in case the server returns an empty > reply, which is happening to me: > > > % curl -vsS

Re: How to trap ctrl-alt-del?

2016-11-26 Thread Guillermo
2016-11-25 6:28 GMT-03:00 Colin Booth: > > On Nov 25, 2016 3:53 AM, "Casper Ti. Vector" wrote: >> >> On Fri, Nov 25, 2016 at 11:07:15AM +0300, Jean Louis wrote: >>> >>> How may I trap ctrl-alt-del, >> >> $ sysctl kernel.ctrl-alt-del=0 > > This is a bit misleading since most (all?) default builds

Re: How to trap ctrl-alt-del?

2016-11-26 Thread Casper Ti. Vector
Try s6-linux-init [1]; you can modify the scripts in the `.s6-svscan' directory according to your requirements. [1] . On Sat, Nov 26, 2016 at 03:10:32PM +0300, Jean Louis wrote: > Now I wonder how to practically implement the -s option, should I just >

Re: How to trap ctrl-alt-del?

2016-11-26 Thread Jean Louis
Now I wonder how to practically implement the -s option, should I just give it something like "sudo s6-poweroff"? On Fri, Nov 25, 2016 at 12:17:24PM +0300, Jean Louis wrote: > Now I found a solution > http://www.mail-archive.com/supervision@list.skarnet.org/msg01038.html > > Thank you

Re: How to trap ctrl-alt-del?

2016-11-25 Thread Casper Ti. Vector
On Fri, Nov 25, 2016 at 11:07:15AM +0300, Jean Louis wrote: > How may I trap ctrl-alt-del, $ sysctl kernel.ctrl-alt-del=0 > and assign a function to it, so that system nicely shuts down?