From c14d92c5c2b07ad3b2023190bdbe4f8cd28a8f8c Mon Sep 17 00:00:00 2001 From: "Han Verstraete (OpenFaaS Ltd)" Date: Wed, 14 May 2025 12:58:30 +0200 Subject: [PATCH] Use full faasd binary path in instructions on RHEL On RHEL systems the installation path of faasd, /usr/local/bin, is not in the sudo PATH by default. Use the full path to the faasd binary in any printed instruction to work around this. Signed-off-by: Han Verstraete (OpenFaaS Ltd) --- hack/install-edge.sh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/hack/install-edge.sh b/hack/install-edge.sh index 1b9e80e..87fc5b3 100644 --- a/hack/install-edge.sh +++ b/hack/install-edge.sh @@ -95,6 +95,17 @@ ${BINLOCATION}arkade oci install --path ${tmpdir} \ cd ${tmpdir} ./install.sh ./ +if has_dnf; then + isRhelLike=true +else + isRhelLike=false +fi + +binaryName="faasd" +if [ "$isRhelLike" = true ]; then + binaryName="/usr/local/bin/faasd" +fi + echo "" echo "3.1 Commercial users can create their license key as follows:" echo "" @@ -103,12 +114,12 @@ echo "sudo nano /var/lib/faasd/secrets/openfaas_license" echo "" echo "3.2 For personal, non-commercial use only, GitHub Sponsors of @openfaas (25USD+) can run:" echo "" -echo "sudo -E faasd github login" -echo "sudo -E faasd activate" +echo "sudo -E ${binaryName} github login" +echo "sudo -E ${binaryName} activate" echo "" echo "4. Then perform the final installation steps" echo "" -echo "sudo -E sh -c \"cd ${tmpdir}/var/lib/faasd && faasd install\"" +echo "sudo -E sh -c \"cd ${tmpdir}/var/lib/faasd && ${binaryName} install\"" echo "" echo "5. Refer to the complete handbook and supplementary documentation at:" echo ""