#!/bin/bash
#
#configure yum repo of centos 5
###########################################
YUM_REPO="/etc/yum.repos.d/Centos_Base.repo"
function yumrepo()
{
echo '[base]
name=CentOS-5 - Base
baseurl=
gpgcheck=1
gpgkey=
[update]
name=CentOS-5 - Updates
baseurl=
gpgcheck=1
gpgkey=
[addons]
name=CentOS-5 - Addons
baseurl=
gpgcheck=1
gpgkey=
[extras]
name=CentOS-5 - Extras
baseurl=
gpgcheck=1
gpgkey=
[centosplus]
name=CentOS-5 - Plus
baseurl=
gpgcheck=1
enabled=0
gpgkey=
[contrib]
name=CentOS-5 - Contrib
baseurl=
gpgcheck=1
enabled=0
gpgkey=
' > $YUM_REPO
}
if [ -f $YUM_REPO ];then
echo -n "whether recreate YUM_REPO [y/n]:"
read INPUT
INPUT=$(echo $INPUT | sed 'y/yn/YN/')
fi
if [ "X$INPUT" != "XN" ];then
yumrepo
rpm --import
fi
59,1 Bot
阅读(2179) | 评论(0) | 转发(0) |