From 9df10494ad3da6cf6a6442c0433c63740ee7f511 Mon Sep 17 00:00:00 2001 From: Trevor Batley Date: Sun, 3 Mar 2024 18:11:00 +1100 Subject: [PATCH] move add required programs eralier --- koji-setup/koji-add-builder.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/koji-setup/koji-add-builder.sh b/koji-setup/koji-add-builder.sh index 12a7bf9..6a5f2d4 100644 --- a/koji-setup/koji-add-builder.sh +++ b/koji-setup/koji-add-builder.sh @@ -36,6 +36,14 @@ if [ -z $KOJI_BUILD_FQDN ] ; then KOJI_BUILD_FQDN=$KOJI_HUB_FQDN fi +# install any required packages +if [[ -z $(dnf list installed | grep epel-release) ]] ; then + dnf install -y epel-release $QUIET +fi +if [[ -z $(dnf list installed | grep netcat) ]] ; then + dnf install -y netcat $QUIET +fi + # check that the target exists RESP=$(nc -z $KOJI_BUILD_FQDN 22 2>&1 | grep succeeded) if [[ -z $RESP ]] ; then @@ -46,14 +54,6 @@ if [[ -z $RESP ]] ; then exit 1 fi -# install any required packages -if [[ -z $(dnf list installed | grep epel-release) ]] ; then - dnf install -y epel-release $QUIET -fi -if [[ -z $(dnf list installed | grep netcat) ]] ; then - dnf install -y netcat $QUIET -fi - ## On the HUB # Add the host entry for the koji builder to the database sudo -u kojiadmin koji add-host "$KOJI_BUILD_FQDN" "$RPM_ARCH" @@ -77,7 +77,7 @@ if [[ $KOJI_BUILD_FQDN = $KOJI_HUB_FQDN ]] ; then curl $SILENT $SCRIPT_GIT/koji-deploy-builder.sh > $SCRIPT_DIR/koji-deploy-builder.sh chmod o+x $SCRIPT_DIR/koji-deploy-builder.sh fi - koji-deploy-builder.sh $DEBUG + $SCRIPT_DIR/koji-deploy-builder.sh $DEBUG else # deploy to specified server @@ -87,7 +87,7 @@ else # add nfs share for koji files direcory to hub curl $SILENT $SCRIPT_GIT/koji-deploy-nfs-server.sh > $SCRIPT_DIR/koji-deploy-nfs-server.sh chmod o+x $SCRIPT_DIR/koji-deploy-nfs-server.sh - koji-deploy-nfs-server.sh $DEBUG + $SCRIPT_DIR/koji-deploy-nfs-server.sh $DEBUG fi # add build server to nfs exports line for /mnt/koji