#!/bin/sh if [ -z "$REPOURL" ]; then echo "You need to specify \$REPOURL" rstrnt-report-result $RSTRNT_TASKNAME FAIL exit 1 fi OFS=$IFS IFS=";" num=1 for repo in $REPOURL; do REPONAME=${REPONAME:="postrepo"}_$num cat << EOF >/etc/yum.repos.d/${REPONAME}.repo [${REPONAME}] name=${REPONAME} baseurl=$repo enabled=1 gpgcheck=0 skip_if_unavailable=1 EOF num=$(expr $num + 1) done IFS=$OFS rstrnt-report-result $RSTRNT_TASKNAME PASS exit 0