From cae65ae648d5d8a93dd55c09a33c080e0905f5e1 Mon Sep 17 00:00:00 2001 From: Maciej Kucia Date: Mon, 13 Apr 2020 12:13:50 +0800 Subject: [PATCH] install: Properly detect enabled selinux --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 57a8ad36fd..7d918d70e3 100755 --- a/install.sh +++ b/install.sh @@ -410,7 +410,7 @@ setup_selinux() { fi if ! $SUDO chcon -u system_u -r object_r -t container_runtime_exec_t ${BIN_DIR}/k3s >/dev/null 2>&1; then - if $SUDO grep SELINUX=enforcing /etc/selinux/config >/dev/null 2>&1; then + if $SUDO grep '^\s*SELINUX=enforcing' /etc/selinux/config >/dev/null 2>&1; then $policy_error "Failed to apply container_runtime_exec_t to ${BIN_DIR}/k3s, ${policy_hint}" fi else