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

fix copycds can't auto copycd centos iso

This commit is contained in:
ypbj 2016-12-14 02:48:10 -05:00
parent 10752d0604
commit 1ff745dbfe

View File

@ -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";