Restore original skip_download behavior

Signed-off-by: Derek Nola <derek.nola@suse.com>
pull/6130/head
Derek Nola 2 years ago
parent 26e9405767
commit e31e6d6d8e

@ -275,6 +275,12 @@ can_skip_download() {
fi fi
} }
can_skip_selinux_download() {
if [ "${INSTALL_K3S_SKIP_DOWNLOAD}" != true ] && [ "${INSTALL_K3S_SKIP_DOWNLOAD}" != "selinux" ]; then
return 1
fi
}
# --- verify an executable k3s binary is installed --- # --- verify an executable k3s binary is installed ---
verify_k3s_is_executable() { verify_k3s_is_executable() {
if [ ! -x ${BIN_DIR}/k3s ]; then if [ ! -x ${BIN_DIR}/k3s ]; then
@ -483,7 +489,7 @@ setup_selinux() {
${package_installer} install -y https://${rpm_site}/k3s/${rpm_channel}/common/${rpm_site_infix}/noarch/k3s-selinux-0.4-1.${rpm_target}.noarch.rpm ${package_installer} install -y https://${rpm_site}/k3s/${rpm_channel}/common/${rpm_site_infix}/noarch/k3s-selinux-0.4-1.${rpm_target}.noarch.rpm
" "
if [ "$INSTALL_K3S_SKIP_SELINUX_RPM" = true ] || [ ! -d /usr/share/selinux ]; then if [ "$INSTALL_K3S_SKIP_SELINUX_RPM" = true ] || can_skip_selinux_download || [ ! -d /usr/share/selinux ]; then
info "Skipping installation of SELinux RPM" info "Skipping installation of SELinux RPM"
elif [ "${ID_LIKE:-}" != coreos ] && [ "${VARIANT_ID:-}" != coreos ]; then elif [ "${ID_LIKE:-}" != coreos ] && [ "${VARIANT_ID:-}" != coreos ]; then
install_selinux_rpm ${rpm_site} ${rpm_channel} ${rpm_target} ${rpm_site_infix} install_selinux_rpm ${rpm_site} ${rpm_channel} ${rpm_target} ${rpm_site_infix}

Loading…
Cancel
Save