From f2f7a4391fd538f0f7e20271335ac0acaadc338d Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 27 Jan 2020 16:27:35 -0500 Subject: [PATCH] Use better CentOS release detection While the media is vague, the rpm name is more specific. --- xCAT-server/lib/xcat/plugins/anaconda.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/anaconda.pm b/xCAT-server/lib/xcat/plugins/anaconda.pm index 76744f719..e8a433176 100644 --- a/xCAT-server/lib/xcat/plugins/anaconda.pm +++ b/xCAT-server/lib/xcat/plugins/anaconda.pm @@ -2071,6 +2071,10 @@ sub copycd } } elsif ($desc and $desc =~ /CentOS Linux (.*)/) { $distname = "centos" . $1; + foreach my $release (glob($mntpath . "/BaseOS/Packages/centos-release-*rpm")) { + $release =~ /.*centos-release-([^-]*)-.*/; + $distname = "centos" . $1; + } } elsif (-r $mntpath . "/isolinux/isolinux.cfg") { my $icfg;