Skip to content

Commit 83e8045

Browse files
weltekialexellis
authored andcommitted
Fix faasd CE install script for RHEL-based systems
This change removes the check-update command. This command is not required and caused the script to exit early if packages are not up to date. In addition DNF is now used to install packages. DNF is the successor of YUM on the latest RHEL-based system. Signed-off-by: Han Verstraete (OpenFaaS Ltd) <[email protected]>
1 parent f409e01 commit 83e8045

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

hack/install.sh

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ verify_system() {
4747
fi
4848
}
4949

50-
has_yum() {
51-
[ -n "$(command -v yum)" ]
50+
has_dnf() {
51+
[ -n "$(command -v dnf)" ]
5252
}
5353

5454
has_apt_get() {
@@ -67,14 +67,16 @@ install_required_packages() {
6767
# reference: https://github.com/openfaas/faasd/pull/237
6868
$SUDO apt-get update -y
6969
$SUDO apt-get install -y curl runc bridge-utils iptables
70-
elif $(has_yum); then
71-
$SUDO yum check-update -y
72-
$SUDO yum install -y curl runc iptables-services
70+
elif $(has_dnf); then
71+
$SUDO dnf install -y \
72+
--allowerasing \
73+
--setopt=install_weak_deps=False \
74+
curl runc iptables-services bridge-utils
7375
elif $(has_pacman); then
7476
$SUDO pacman -Syy
7577
$SUDO pacman -Sy curl runc bridge-utils
7678
else
77-
fatal "Could not find apt-get, yum, or pacman. Cannot install dependencies on this OS."
79+
fatal "Could not find apt-get, dnf, or pacman. Cannot install dependencies on this OS."
7880
exit 1
7981
fi
8082
}

0 commit comments

Comments
 (0)