The mklocalrepo.sh file is automatically created for xcat-core

and xcat-dep.  For xcat-dep on linux (non ubuntu), mklocalrepo.sh
should be executed in the <os>/<arch> subdirectory. If xCAT*.repo
file is not found in the executing directory, print out
a message to tell the user instead of creating a blank file in
/etc/yum.repos.d which will not work anyway.
This commit is contained in:
Victor Hu 2015-01-29 10:10:15 -05:00
parent d3b729dadc
commit 5cd9060421

View File

@ -423,6 +423,10 @@ EOF
#!/bin/sh
cd `dirname $0`
REPOFILE=`basename xCAT-*.repo`
if [[ $REPOFILE == "xCAT-*.repo" ]]; then
echo "ERROR: For xcat-dep, please execute $0 in the correct <os>/<arch> subdirectory"
exit 1
fi
sed -e 's|baseurl=.*|baseurl=file://'"`pwd`"'|' $REPOFILE | sed -e 's|gpgkey=.*|gpgkey=file://'"`pwd`"'/repodata/repomd.xml.key|' > /etc/yum.repos.d/$REPOFILE
cd -
EOF2