Skip to content

Commit

Permalink
Merge pull request #12841 from ggbecker/fix-ctrl-alt-del-scenarios
Browse files Browse the repository at this point in the history
disable_ctrlaltdel_burstaction: make sure config file exists
  • Loading branch information
Mab879 authored Jan 17, 2025
2 parents faae294 + 1ef2ab0 commit 6066a3f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash

touch /etc/systemd/system.conf

if grep -q "^CtrlAltDelBurstAction=" /etc/systemd/system.conf; then
sed -i "s/^CtrlAltDelBurstAction.*/CtrlAltDelBurstAction=none/" /etc/systemd/system.conf
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/bin/bash

# make sure the file exist
touch /etc/systemd/system.conf


sed -i "/^CtrlAltDelBurstAction.*/d" /etc/systemd/system.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

# make sure the file exist
touch /etc/systemd/system.conf

if grep -q "^CtrlAltDelBurstAction=" /etc/systemd/system.conf; then
sed -i "s/^CtrlAltDelBurstAction.*/CtrlAltDelBurstAction=poweroff-immediate/" /etc/systemd/system.conf
Expand Down

0 comments on commit 6066a3f

Please sign in to comment.