diff --git a/xCAT/postscripts/addsiteyum b/xCAT/postscripts/addsiteyum old mode 100644 new mode 100755 index 132e9d0b7..a93b69158 --- a/xCAT/postscripts/addsiteyum +++ b/xCAT/postscripts/addsiteyum @@ -1,7 +1,14 @@ #!/bin/sh -for i in /install/postscripts/repos/$OSVER/$ARCH/* +cd `dirname $0` +if [ ! -d repos/$OSVER/$ARCH ]; then + exit; +fi +for i in repos/$OSVER/$ARCH/* do + if [ ! -r "$i" ]; then + continue + fi TARGFILE=`basename $i` - TARGFILE=`echo $TARGFILE|sed -e s/.tmpl$//` - sed -e s!#INSTSERVER#!$MASTER! $i > /etc/yum/repos.d/$TARGFILE + TARGFILE=`echo $TARGFILE|sed -e s/.tmpl$/.repo/` + sed -e s!#INSTSERVER#!$MASTER! $i > /etc/yum.repos.d/$TARGFILE done