From 4e89b7545473c552a54d2c62ae46c8a7b342e627 Mon Sep 17 00:00:00 2001 From: penguhyang Date: Tue, 1 Nov 2016 10:15:51 +0800 Subject: [PATCH] auto recognize rhhpc iso on copycds (#2034) --- xCAT-server/lib/xcat/plugins/anaconda.pm | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/anaconda.pm b/xCAT-server/lib/xcat/plugins/anaconda.pm index 01fd184e9..a2a37be24 100644 --- a/xCAT-server/lib/xcat/plugins/anaconda.pm +++ b/xCAT-server/lib/xcat/plugins/anaconda.pm @@ -2257,6 +2257,17 @@ sub copycd # my @rhel_version = split / /, $desc; $distname = "rhels" . $rhel_version[4]; + open($dinfo, $mntpath . "/.treeinfo"); + while (<$dinfo>) { + chomp($_); + s/\s+$//; #remove trailing spaces + next if /^\s*$/; #-- skip empty lines + if ($_ =~ /variant = ComputeNode/) { + $distname = "rhelhpc" . $rhel_version[4]; + last; + } + } + close($dinfo); } else {