Skip to content
Snippets Groups Projects
Commit 364b57a3 authored by Bob Mottram's avatar Bob Mottram
Browse files

Turn off magic sysrq

parent 850d5628
No related branches found
No related tags found
No related merge requests found
......@@ -286,6 +286,18 @@ function initial_setup {
mark_completed $FUNCNAME
}
function turn_off_magic_sysrq {
if grep -q 'kernel.sysrq = 0' /etc/sysctl.conf; then
return
fi
if grep -q 'kernel.sysrq' /etc/sysctl.conf; then
sed -i 's|#kernel.sysrq.*|kernel.sysrq = 0|g' /etc/sysctl.conf
sed -i 's|kernel.sysrq.*|kernel.sysrq = 0|g' /etc/sysctl.conf
else
echo 'kernel.sysrq = 0' >> /etc/sysctl.conf
fi
}
function setup_grub {
if [[ $ARCHITECTURE == 'qemu'* || $ARCHITECTURE == 'amd64' || $ARCHITECTURE == 'x86_64' || $ARCHITECTURE == 'i686' || $ARCHITECTURE == 'i386' ]]; then
if ! grep -q 'ifnames=0' /etc/default/grub; then
......@@ -782,6 +794,9 @@ function setup_utils {
function_check enable_predictable_device_names
enable_predictable_device_names
function_check turn_off_magic_sysrq
turn_off_magic_sysrq
function_check separate_tmp_filesystem
separate_tmp_filesystem 150
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment