0

I have a miniature PC here with a large and prominent power button on the front which is easy to bump accidentally.

The system is running CentOS 7 with systemd.

I already know that I can set HandlePowerKey=ignore in /etc/systems/login.conf but this disables it entirely.

What is the procedure for addressing this on CentOS?

Zhro
  • 2,669

2 Answers2

1

Some while ago I created this handy script: https://github.com/stackcoder/doublepress

It can prevent accidental shutdowns by requiring double pressing the power button. It's written for Debian, but I'm pretty sure it can be also installed on CentOS.

0

You might be able to tackle this via BIOS level setting.

There should be a setting in power or system management with reference to power button. It normally has two options: instant action, and delayed for a couple of seconds.

M.N.
  • 352