Merge pull request #1637 from MaciejKucia/mattkucia/fix-install

install: Properly detect enabled selinux
pull/1373/head^2
Darren Shepherd 2020-04-27 09:25:15 -07:00 committed by GitHub
commit 0efe2af1a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -423,7 +423,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