From 1ff745dbfef7ce7ed6a367ef08b3b50bf975e416 Mon Sep 17 00:00:00 2001 From: ypbj Date: Wed, 14 Dec 2016 02:48:10 -0500 Subject: [PATCH] fix copycds can't auto copycd centos iso --- xCAT-server/lib/xcat/plugins/anaconda.pm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/anaconda.pm b/xCAT-server/lib/xcat/plugins/anaconda.pm index 6decce701..4cdf82c10 100644 --- a/xCAT-server/lib/xcat/plugins/anaconda.pm +++ b/xCAT-server/lib/xcat/plugins/anaconda.pm @@ -2266,6 +2266,20 @@ sub copycd } close($dinfo); } + elsif ($desc =~ /^[\d\.]+$/) + { + open($dinfo, $mntpath . "/.treeinfo"); + while (<$dinfo>) { + chomp($_); + s/\s+$//; #remove trailing spaces + next if /^\s*$/; #-- skip empty lines + if ($_ =~ /family\s*=\s*CentOS/i) { + $distname = "centos" . $desc; + last; + } + } + close($dinfo); + } else { print "INFO - Could not auto-detect operating system.\n";