diff --git a/install.sh b/install.sh index 1dbdb646dfd..9820742ef70 100755 --- a/install.sh +++ b/install.sh @@ -511,7 +511,7 @@ get_pr_artifact_url() { if [ -z "${commit_id}" ]; then fatal "Installing PR builds requires GITHUB_TOKEN with k3s-io/k3s repo permissions" fi - + get_commit_artifact_url "${commit_id}" } @@ -610,8 +610,8 @@ setup_selinux() { rpm_site_infix=slemicro package_installer=zypper fi - elif [ "${ID_LIKE:-}" = coreos ] || [ "${VARIANT_ID:-}" = coreos ] || [ "${VARIANT_ID:-}" = "iot" ] || \ - { { [ "${ID:-}" = fedora ] || [ "${ID_LIKE:-}" = fedora ]; } && [ -n "${OSTREE_VERSION:-}" ]; }; then + # cover any atomic fedora flavors using rpm-ostree + elif { [ "${ID:-}" = fedora ] || [ "${ID_LIKE:-}" = fedora ]; } && [ -n "${OSTREE_VERSION:-}" ]; then rpm_target=coreos rpm_site_infix=coreos package_installer=rpm-ostree @@ -629,10 +629,6 @@ setup_selinux() { package_installer=yum fi - if [ "${package_installer}" = "rpm-ostree" ] && [ -x /bin/yum ]; then - package_installer=yum - fi - if [ "${package_installer}" = "yum" ] && [ -x /usr/bin/dnf ]; then package_installer=dnf fi @@ -652,8 +648,7 @@ 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 ] || [ "${VARIANT_ID:-}" = iot ]; then + if [ "$INSTALL_K3S_SELINUX_WARN" = true ]; then policy_error=warn fi @@ -662,8 +657,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 ] || \ - { { [ "${ID:-}" = fedora ] || [ "${ID_LIKE:-}" = fedora ]; } && [ -n "${OSTREE_VERSION:-}" ]; }; then + if [ -x /usr/sbin/transactional-update ] || [ "${rpm_target}" = "coreos" ]; 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 d985600728b..9fe5f4319db 100644 --- a/install.sh.sha256sum +++ b/install.sh.sha256sum @@ -1 +1 @@ -448f9207d4d566066269d5f8950a457aced691aadf9d455a98dfd1dc1b75bef3 install.sh +46177d4c99440b4c0311b67233823a8e8a2fc09693f6c89af1a7161e152fbfad install.sh