2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-01-08 01:12:33 +00:00

Merge pull request #6070 from neo954/rhels8-genimage

[RH8] Add --releasever argument to yum command
This commit is contained in:
yangsong
2019-03-12 12:55:18 +08:00
committed by GitHub

View File

@@ -358,6 +358,14 @@ if($onlyinitrd){
my $yumcmd = "yum $non_interactive -c /tmp/genimage.$$.yum.conf --installroot=$rootimg_dir/ --disablerepo=* ";
if ($osver =~ /^rhel\D*(\d*)[.\d]*.*$/) {
$majorrel = $1;
if ($majorrel > 7) {
$yumcmd .= "--releasever=" . $majorrel . " ";
$yumcmd .= "--setopt=module_platform_id=platform:el" . $majorrel . " ";
}
}
foreach (0 .. $repnum) {
$yumcmd .= "--enablerepo=$osver-$arch-$_ ";
}