From 5ae1be5fbff141ec7c97aa32ba996188bd1ed60c Mon Sep 17 00:00:00 2001 From: Bill Peck Date: Wed, 11 Nov 2015 11:54:53 -0500 Subject: Support multiple repos in REPOURL separated by ; --- distribution/addrepo/runtest.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/distribution/addrepo/runtest.sh b/distribution/addrepo/runtest.sh index 6f0f70d..40b1ff1 100755 --- a/distribution/addrepo/runtest.sh +++ b/distribution/addrepo/runtest.sh @@ -6,15 +6,22 @@ rstrnt-report-result $RSTRNT_TASKNAME FAIL exit 1 fi -REPONAME=${REPONAME:="postrepo_${RSTRNT_TASKID}"} -cat << EOF >/etc/yum.repos.d/${REPONAME}.repo +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=$(eval echo ${REPOURL}) +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 -- cgit