From bedb25ff1fe3b942d2d8b83d6856c3fecc9ef152 Mon Sep 17 00:00:00 2001 From: Derek Nola Date: Thu, 24 Oct 2024 11:33:39 -0700 Subject: [PATCH] Capture all fedora atomic variants in install script Signed-off-by: Derek Nola --- install.sh | 6 ++++-- install.sh.sha256sum | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index df20ce4e117a..8e6e034bd1a4 100755 --- a/install.sh +++ b/install.sh @@ -579,7 +579,8 @@ setup_selinux() { rpm_site_infix=slemicro package_installer=zypper fi - elif [ "${ID_LIKE:-}" = coreos ] || [ "${VARIANT_ID:-}" = coreos ] || [ "${VARIANT_ID:-}" = "iot" ]; then + elif [ "${ID_LIKE:-}" = coreos ] || [ "${VARIANT_ID:-}" = coreos ] || [ "${VARIANT_ID:-}" = "iot" ] || \ + { [ "${ID:-}" = "fedora" ] && [ -n "${OSTREE_VERSION:-}" ]; }; then rpm_target=coreos rpm_site_infix=coreos package_installer=rpm-ostree @@ -629,7 +630,8 @@ setup_selinux() { $policy_error "Failed to apply container_runtime_exec_t to ${BIN_DIR}/k3s, ${policy_hint}" fi elif [ ! -f /usr/share/selinux/packages/k3s.pp ]; then - if [ -x /usr/sbin/transactional-update ] || [ "${ID_LIKE:-}" = coreos ] || [ "${VARIANT_ID:-}" = coreos ] || [ "${VARIANT_ID:-}" = iot ]; then + if [ -x /usr/sbin/transactional-update ] || [ "${ID_LIKE:-}" = coreos ] || \ + { [ "${ID:-}" = fedora ] && [ -n "${OSTREE_VERSION:-}" ]; }; then warn "Please reboot your machine to activate the changes and avoid data loss." else $policy_error "Failed to find the k3s-selinux policy, ${policy_hint}" diff --git a/install.sh.sha256sum b/install.sh.sha256sum index a6c5e68b4773..0ca631e5aa35 100644 --- a/install.sh.sha256sum +++ b/install.sh.sha256sum @@ -1 +1 @@ -e0fbc48a74045ae279bde25bf6ac5502b256017d4d648b53750050993d4b71e6 install.sh +389af49719e833ca28405d4b32e8e332f94de08f1d4c738c1cb2a0548b22cd32 install.sh