On 2017-04-15 14:24, Rüdiger Meier wrote:
On 04/14/2017 07:45 PM, Carlos E. R. wrote:
Do we have a method so that halt, reboot, suspend, hibernate operations are disabled? Requiring a secondary confirmation or removal of the inhibit?
Scenario: ssh to server. I can accidentally type the wrong command to the wrong session and thus disable the server. If I'm local restoring is easy, but not if remote.
Happened already once (I was local).
IMO it makes no sense to protect you from yourself by adding a "secondary confirmation" dialog.
It would suffice ;-)
Instead you could either
1. add a way to start the server via remote (iAMT, IPMI, WoL and/or most system independent powerline networking adaptors).
Only by rigging a motor to push the button, LOL! :-) Or phoning some one to please push the button.
2. configure your server that it *always* reboots (via BIOS, or call "rtcwake" from a shutdown script). And disable suspend/hilbernate somehow.
Ah, that "somehow" is the problem ;-) I think I will create my own hibernate script and get used to call that one instead of the "systemctl hibernate" call, something that I wanted to do already for other reasons. I'm not aiming to make a fully failsafe server. Just a reminder when trying to halt the computer will be enough for now. I think I will do that alias trick. PATH=/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games Can't be a script for this one, though. -- Cheers / Saludos, Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar)