From 0dd7e7963596b5ee2ee57afd0e866e90bea9fd51 Mon Sep 17 00:00:00 2001 From: mavscjb Date: Mon, 2 Nov 2015 21:58:12 -0500 Subject: [PATCH] fix for Ubuntu MN to provision rhel CN failed --- xCAT-server/lib/xcat/plugins/kit.pm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/kit.pm b/xCAT-server/lib/xcat/plugins/kit.pm index 48743872f..25667850b 100644 --- a/xCAT-server/lib/xcat/plugins/kit.pm +++ b/xCAT-server/lib/xcat/plugins/kit.pm @@ -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. @@ -618,9 +618,12 @@ sub assign_to_osimage } # Consider the mixed environment my $imagerhelflag = 0; - if ( $osimage =~ /rhel/ ){ - $imagerhelflag = 1; - } + if ( $osimagetable and $osimagetable->{osvers} ) { + if ($osimagetable->{osvers} =~ /rhel/){ + $imagerhelflag = 1; + } + } + if ( $debianflag && $imagerhelflag) {