2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-19 04:40:21 +00:00

Merge pull request #351 from mavscjb/master

fix for Ubuntu MN to provision rhel CN failed
This commit is contained in:
bybai
2015-11-03 17:27:42 +08:00

View File

@ -397,7 +397,7 @@ sub assign_to_osimage
my $tabs = shift;
(my $kitcomptable) = $tabs->{kitcomponent}->getAttribs({kitcompname=> $kitcomp}, 'kitname', 'kitreponame', 'basename', 'kitcompdeps', 'kitpkgdeps', 'prerequisite', 'exlist', 'genimage_postinstall','postbootscripts', 'driverpacks');
(my $osimagetable) = $tabs->{osimage}->getAttribs({imagename=> $osimage}, 'provmethod', 'osarch', 'postbootscripts', 'kitcomponents');
(my $osimagetable) = $tabs->{osimage}->getAttribs({imagename=> $osimage}, 'provmethod', 'osarch', 'postbootscripts', 'kitcomponents', 'osvers');
(my $linuximagetable) = $tabs->{linuximage}->getAttribs({imagename=> $osimage}, 'rootimgdir', 'exlist', 'postinstall', 'otherpkglist', 'otherpkgdir', 'driverupdatesrc');
# Reading installdir.
@ -616,7 +616,25 @@ sub assign_to_osimage
unless ( -d "$otherpkgdir" ) {
mkpath("$otherpkgdir");
}
if ( $debianflag )
# Consider the mixed environment
my $imagerhelflag = 0;
if ( $osimagetable and $osimagetable->{osvers} ) {
if ($osimagetable->{osvers} =~ /rhel/){
$imagerhelflag = 1;
}
}
if ( $debianflag && $imagerhelflag)
{
unless ( -d "$otherpkgdir/$kitcomptable->{kitreponame}" )
{
system("ln -sf $kitrepodir $otherpkgdir/$kitcomptable->{kitreponame} ");
}
}
elsif ( $debianflag )
{
unless ( -d "$otherpkgdir/$kitcomptable->{kitreponame}" )
{