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

Merge pull request #2317 from penguhyang/centos1611

fix copycds can't auto copycd centos iso
This commit is contained in:
yangsong 2016-12-27 10:37:53 +08:00 committed by GitHub
commit b56f09f44d

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