2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-09-29 13:38:12 +00:00

Improve genimage AlmaLinux support

This commit is contained in:
Markus Hilger
2025-05-23 19:17:54 +02:00
parent d5108c025d
commit 10a485dca5

View File

@@ -372,15 +372,7 @@ 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 . " ";
}
}
if ($osver =~ /^ol\D*(\d*)[.\d]*.*$/) {
if ($osver =~ /^(?:rhel|rocky|alma|ol)\D*(\d*)[.\d]*.*$/) {
$majorrel = $1;
if ($majorrel > 7) {
$yumcmd .= "--releasever=" . $majorrel . " ";
@@ -1985,6 +1977,10 @@ sub using_systemd {
if ($1 >= 8) {
return 1;
}
} elsif ($os =~ /alma(\d+)/) {
if ($1 >= 8) {
return 1;
}
} elsif ($os =~ /ol(\d+)/) {
if ($1 >= 7) {
return 1;