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
|
2012-05-15 06:57:51 +00:00
|
|
|
logger -t xcat -p local4.err "addsiteyum: repos/$OSVER/$ARCH is not a directory"
|
2012-11-22 07:59:03 +00:00
|
|
|
exit -1;
|
2008-03-26 15:39:32 +00:00
|
|
|
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
|
2012-12-19 07:51:22 +00:00
|
|
|
rm -rf /etc/yum.repos.d/*
|
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
|
2012-11-22 07:59:03 +00:00
|
|
|
|
|
|
|
exit 0
|