fixed bug 3706, enabled=0 in the Centos-Base.repo

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@17011 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jjhua 2013-07-23 05:27:34 +00:00
parent 383c35fb49
commit 18c8045c66

View File

@ -538,6 +538,13 @@ if (-d "$rootimg_dir/usr/share/dracut") {
print "Enter the dracut mode. Dracut version: $dracutver. Dracut directory: $dracutdir.\n";
}
#-- for centos, disable the internet repository
if( -e "$rootimg_dir/etc/yum.repos.d/CentOS-Base.repo" ) {
my $repo_content=`sed -e '/enabled/d' $rootimg_dir/etc/yum.repos.d/CentOS-Base.repo | sed -e '/^gpgkey/i enabled=0'`;
system("echo '$repo_content' > $rootimg_dir/etc/yum.repos.d/CentOS-Base.repo");
}
#
#-- run postinstall script
unless ($imagename) {
$postinstall_filename= imgutils::get_profile_def_filename($osver, $profile, $arch, $customdir, "postinstall");