Linux下消除短按开关键关闭系统

您所在的位置:网站首页 禁止按键关机怎么设置 Linux下消除短按开关键关闭系统

Linux下消除短按开关键关闭系统

2024-07-11 04:40| 来源: 网络整理| 查看: 265

客户提出一个问题:触碰电源键导致系统关机?

我的第一想法是:卧槽,你没事按开关键干嘛。。。

但是还是解释:服务器电源开关键,短按为顺序关机,长按为强制关机。(顺序关机为发送信号至系统,触发系统关机命令poweroff;强制关机为BIOS层面的关机)

在通用RHEL系统中,按电源键后OS的反应是由/etc/acpi/events/power.conf配置文件决定的,默认是action=/etc/acpi/actions/power.sh,请参考:

[root@RHEL6 events]# pwd /etc/acpi/events [root@RHEL6 events]# cat power.conf # ACPID config to power down machine if powerbutton is pressed, but only if # no gnome-power-manager is running event=button/power.* action=/etc/acpi/actions/power.sh [root@RHEL6 events]# 在通用SLES系统中,按电源键后OS的反应是由/etc/acpi/events/power_button配置文件决定的,默认是action=/usr/lib/acpid/power_button,请参考:

linux-xen:/etc/acpi/events # pwd /etc/acpi/events linux-xen:/etc/acpi/events # cat power_button # care about the power button event=button/power.* action=/usr/lib/acpid/power_button linux-xen:/etc/acpi/events #



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3