SHA256
1
0
forked from pool/k3s-install
k3s-install/inform-user-of-current-k3s-SELinux-support.patch

39 lines
1.2 KiB
Diff

From c7aaa079c0669aa550a525e0c848c8cfc9e114cc Mon Sep 17 00:00:00 2001
From: Richard Brown <rbrownccb@opensuse.org>
Date: Wed, 17 Mar 2021 16:18:51 +0100
Subject: [PATCH] install.sh: Inform user of current k3s+SELinux support status
for SUSE/openSUSE systems
Signed-off-by: Richard Brown <rbrownccb@opensuse.org>
---
install.sh | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/install.sh b/install.sh
index 00101ae0e7..b356fcc646 100755
--- a/install.sh
+++ b/install.sh
@@ -455,10 +455,18 @@ setup_selinux() {
rpm_site="rpm-testing.rancher.io"
fi
- policy_hint="please install:
+ . /etc/os-release
+ if [ "${ID_LIKE:-}" = suse ] ; then
+ policy_hint='k3s with SELinux is currently not supported on SUSE/openSUSE systems.
+ please disable SELinux before installing k3s
+'
+ else
+ policy_hint="please install:
yum install -y container-selinux selinux-policy-base
yum install -y https://${rpm_site}/k3s/${rpm_channel}/common/centos/7/noarch/k3s-selinux-0.2-1.el7_8.noarch.rpm
"
+ fi
+
policy_error=fatal
if [ "$INSTALL_K3S_SELINUX_WARN" = true ] || grep -q 'ID=flatcar' /etc/os-release; then
policy_error=warn
--
2.32.0