feat(install): replace rpm by yum for setup_selinux (#1829)

It's a bad practice to install packages via rpm directly. It's better to install all packages with Yum/Dnf. It's also possible to install packages directly via an URL, which is the purpose of this PR.
This commit is contained in:
Kevin Messer 2020-09-26 10:45:33 +02:00 committed by GitHub
parent 86d2e2a5f8
commit 6c9f3d528a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -431,7 +431,7 @@ setup_binary() {
setup_selinux() { setup_selinux() {
policy_hint="please install: policy_hint="please install:
yum install -y container-selinux selinux-policy-base yum install -y container-selinux selinux-policy-base
rpm -i https://rpm.rancher.io/k3s-selinux-0.1.1-rc1.el7.noarch.rpm yum install -y https://rpm.rancher.io/k3s-selinux-0.1.1-rc1.el7.noarch.rpm
" "
policy_error=fatal policy_error=fatal
if [ "$INSTALL_K3S_SELINUX_WARN" = true ]; then if [ "$INSTALL_K3S_SELINUX_WARN" = true ]; then