From 3b10cb8cbfb121e1e7ec00ba567e1fee73be5655 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Wed, 26 Mar 2008 15:39:32 +0000 Subject: [PATCH] Fix the yum repository setup postscript git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@899 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT/postscripts/addsiteyum | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) mode change 100644 => 100755 xCAT/postscripts/addsiteyum 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