From a185018a9be7f661fd3d00cec6d971e8f6a3c19f Mon Sep 17 00:00:00 2001 From: Trevor Batley Date: Thu, 16 Nov 2023 14:59:21 +1100 Subject: [PATCH] nfs-utils and export fix --- koji-setup/koji-deploy-nfs-client.sh | 4 +++- koji-setup/koji-deploy-nfs-server.sh | 7 +++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/koji-setup/koji-deploy-nfs-client.sh b/koji-setup/koji-deploy-nfs-client.sh index 9666127..ee342ab 100755 --- a/koji-setup/koji-deploy-nfs-client.sh +++ b/koji-setup/koji-deploy-nfs-client.sh @@ -31,7 +31,9 @@ fi source "$SCRIPT_DIR"/koji-parameters.sh # Install nfs-utils -dnf install -y nfs-utils $QUIET +if [[ -z $(dnf list installed | grep nfs-utils) ]] ; then + dnf install -y nfs-utils $QUIET +fi KOJI_MOUNT_SERVICE="${KOJI_DIR:1}" KOJI_MOUNT_SERVICE="${KOJI_MOUNT_SERVICE/\//-}".mount diff --git a/koji-setup/koji-deploy-nfs-server.sh b/koji-setup/koji-deploy-nfs-server.sh index 5789125..01409e9 100755 --- a/koji-setup/koji-deploy-nfs-server.sh +++ b/koji-setup/koji-deploy-nfs-server.sh @@ -30,10 +30,13 @@ if [ ! -f "$SCRIPT_DIR"/koji-parameters.sh ] ; then fi source "$SCRIPT_DIR"/koji-parameters.sh -dnf install -y nfs-utils $QUIET +# Install nfs-utils +if [[ -z $(dnf list installed | grep nfs-utils) ]] ; then + dnf install -y nfs-utils $QUIET +fi # Export server directory to be mounted by clients - add script will add clients -echo "$KOJI_DIR" >> /etc/exports +echo $KOJI_DIR >> /etc/exports # allow nfs usage in selinux and firewall setsebool -P httpd_use_nfs=1