add make_yum_server to modify 'delete unused code about creat yum' patch error

Change-Id: I03a0ee84a6392ea703a76e69add9fca68f0963f8
Signed-off-by: Yao Lu <lu.yao135@zte.com.cn>
This commit is contained in:
Yao Lu 2016-09-26 10:06:21 +08:00
parent ccdcdedd35
commit 87db6f74a5

View File

@ -2,6 +2,12 @@
if [ ! "$_DAISY_YUM_FILE" ];then
function make_yum_server
{
path=`pwd`
createrepo --update $path &>/dev/null
[ "$?" -ne 0 ] && { echo "createrepo in $path failed"; exit 1; }
}
function make_yum_client
{
@ -27,6 +33,7 @@ function yum_set
rm -rf /etc/yum.repos.d/daisy*
echo "creating yum repo, please wait for several seconds..."
yum install -y createrepo
make_yum_server
make_yum_client
echo "creating epel yum repo, please wait for several seconds..."
yum install -y epel-release