diff --git a/k3s/scripts/init-k3s.sh b/k3s/scripts/init-k3s.sh index 5ad0ad8..37dde16 100644 --- a/k3s/scripts/init-k3s.sh +++ b/k3s/scripts/init-k3s.sh @@ -25,7 +25,7 @@ source common.sh disable_firewalld # Annotate system configuration -cat ../etc/sysctl.d/*.conf | sort | uniq | while read -r str; do +cat ../etc/sysctl.d/*.conf | sort | uniq | grep -v ^$ | while read -r str; do k=${str%=*} v=${str#*=} echo "$k=$v # sealos" diff --git a/k8s/scripts/init-kube.sh b/k8s/scripts/init-kube.sh index 0774da1..10a67e6 100644 --- a/k8s/scripts/init-kube.sh +++ b/k8s/scripts/init-kube.sh @@ -26,7 +26,7 @@ source common.sh disable_firewalld # Annotate system configuration -cat ../etc/sysctl.d/*.conf | sort | uniq | while read -r str; do +cat ../etc/sysctl.d/*.conf | sort | uniq | grep -v ^$ | while read -r str; do k=${str%=*} v=${str#*=} echo "$k=$v # sealos"