2008-03-26 15:04:32 +00:00
|
|
|
#!/bin/sh
|
2008-03-26 15:39:32 +00:00
|
|
|
cd `dirname $0`
|
|
|
|
if [ ! -d repos/$OSVER/$ARCH ]; then
|
2011-04-01 22:34:39 +00:00
|
|
|
logger -t xcat "addsiteyum: repos/$OSVER/$ARCH is not a directory"
|
2008-03-26 15:39:32 +00:00
|
|
|
exit;
|
|
|
|
fi
|
|
|
|
for i in repos/$OSVER/$ARCH/*
|
2008-03-26 15:04:32 +00:00
|
|
|
do
|
2008-03-26 15:39:32 +00:00
|
|
|
if [ ! -r "$i" ]; then
|
|
|
|
continue
|
|
|
|
fi
|
2008-03-26 15:04:32 +00:00
|
|
|
TARGFILE=`basename $i`
|
2008-03-26 15:39:32 +00:00
|
|
|
TARGFILE=`echo $TARGFILE|sed -e s/.tmpl$/.repo/`
|
|
|
|
sed -e s!#INSTSERVER#!$MASTER! $i > /etc/yum.repos.d/$TARGFILE
|
2008-03-26 15:04:32 +00:00
|
|
|
done
|