From 4687ffc5928c4f249f28bacb83c9b66c2b90765d Mon Sep 17 00:00:00 2001 From: Brian Downs Date: Mon, 6 Jul 2020 10:52:47 -0700 Subject: [PATCH] update setting of kernel params to persist after reboot Signed-off-by: Brian Downs --- install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index a1965f8b36..67da5f777c 100755 --- a/install.sh +++ b/install.sh @@ -875,10 +875,10 @@ setup_etcd_user() { # update_kernel_params adjusts the necessary kernel parameters # to allow RKE2 to run in CIS mode. update_kernel_params() { - sysctl -w vm.panic_on_oom=0 - sysctl -w kernel.panic=10 - sysctl -w kernel.panic_on_oops=1 - sysctl -w kernel.keys.root_maxbytes=25000000 + for param in vm.panic_on_oom=0 kernel.panic=10 kernel.panic_on_oops=1 kernel.keys.root_maxbytes=25000000; do + sysctl -w ${param} + echo ${param} >> /etc/sysctl.d/local.conf + done } # main