From 3ec008db60bb08a3802a5c5883ff260af501a2cc Mon Sep 17 00:00:00 2001 From: cxhong Date: Mon, 10 Jun 2019 16:53:05 -0400 Subject: [PATCH] Pick correct pkglist/tmpl files based on the osvers --- xCAT-server/lib/perl/xCAT/SvrUtils.pm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/xCAT-server/lib/perl/xCAT/SvrUtils.pm b/xCAT-server/lib/perl/xCAT/SvrUtils.pm index 9722fdd06..4248cede5 100755 --- a/xCAT-server/lib/perl/xCAT/SvrUtils.pm +++ b/xCAT-server/lib/perl/xCAT/SvrUtils.pm @@ -482,7 +482,9 @@ sub getsynclistfile() sub get_os_search_list { my $os = shift; - my @word = split(/\./, $os); + #example: for os=rhels7.6-alternate + my ($baseos, $alter) = split(/\-/, $os); + my @word = split(/\./, $baseos); my @list = (); while ($word[-1] =~ /^[0-9]+$/) { @@ -713,7 +715,7 @@ sub update_tables_with_templates my $genos = $osver; $genos =~ s/\..*//; if ($genos =~ /rh.*s(\d*)/) { - $genos = "rhel$1"; + $genos = "rhels$1"; } @@ -935,7 +937,7 @@ sub update_tables_with_mgt_image my $genos = $osver; $genos =~ s/\..*//; if ($genos =~ /rh.*s(\d*)/) { - $genos = "rhel$1"; + $genos = "rhels$1"; } #if the osver does not match the osver of MN, return @@ -1141,7 +1143,7 @@ sub update_tables_with_diskless_image my $genos = $osver; $genos =~ s/\..*//; if ($genos =~ /rh.*s(\d*)/) { - $genos = "rhel$1"; + $genos = "rhels$1"; } #print "osver=$osver, arch=$arch, osname=$osname, genos=$genos, profile=$profile\n";