Check /etc/os-release exists before sourcing it

Signed-off-by: Richard Brown <rbrownccb@opensuse.org>
pull/3918/head
Richard Brown 2021-07-30 13:56:59 +02:00 committed by Brad Davidson
parent 51b7451709
commit f94d8d76a8
1 changed files with 1 additions and 1 deletions

View File

@ -459,7 +459,7 @@ setup_selinux() {
rpm_site="rpm-testing.rancher.io"
fi
. /etc/os-release
[ -r /etc/os-release ] && . /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