From 8ff7d162ccab2f41c321d5cdf77a2c30829bab82 Mon Sep 17 00:00:00 2001 From: Derek Nola Date: Tue, 6 Aug 2024 11:29:50 -0700 Subject: [PATCH] Allow fedora iot rpm installs Signed-off-by: Derek Nola Co-Authored-By: Blayne Campbell <5565939+bcambl@users.noreply.github.com> --- install.sh | 7 ++++--- install.sh.sha256sum | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 3606e7349f..90070fbe74 100755 --- a/install.sh +++ b/install.sh @@ -579,7 +579,7 @@ setup_selinux() { rpm_site_infix=slemicro package_installer=zypper fi - elif [ "${ID_LIKE:-}" = coreos ] || [ "${VARIANT_ID:-}" = coreos ]; then + elif [ "${ID_LIKE:-}" = coreos ] || [ "${VARIANT_ID:-}" = coreos ] || [ "${VARIANT_ID:-}" = "iot" ]; then rpm_target=coreos rpm_site_infix=coreos package_installer=rpm-ostree @@ -619,7 +619,8 @@ setup_selinux() { install_selinux_rpm ${rpm_site} ${rpm_channel} ${rpm_target} ${rpm_site_infix} policy_error=fatal - if [ "$INSTALL_K3S_SELINUX_WARN" = true ] || [ "${ID_LIKE:-}" = coreos ] || [ "${VARIANT_ID:-}" = coreos ]; then + if [ "$INSTALL_K3S_SELINUX_WARN" = true ] || [ "${ID_LIKE:-}" = coreos ] || + [ "${VARIANT_ID:-}" = coreos ] || [ "${VARIANT_ID:-}" = iot ]; then policy_error=warn fi @@ -628,7 +629,7 @@ 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 ]; then + if [ -x /usr/sbin/transactional-update ] || [ "${ID_LIKE:-}" = coreos ] || [ "${VARIANT_ID:-}" = coreos ] || [ "${VARIANT_ID:-}" = iot ]; 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 6f6cbfb93a..338c07c051 100644 --- a/install.sh.sha256sum +++ b/install.sh.sha256sum @@ -1 +1 @@ -678e37945882e520533561514c3c1348efd298a3695cd9639934dade96d23c74 install.sh +cc3c773e19d62e318370b01a8e1f166ed7368e6c493fe3ef21c9327052cb3422 install.sh