From 10a485dca57330473859083b686c775fa603e0b7 Mon Sep 17 00:00:00 2001 From: Markus Hilger Date: Fri, 23 May 2025 19:17:54 +0200 Subject: [PATCH] Improve genimage AlmaLinux support --- xCAT-server/share/xcat/netboot/rh/genimage | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/xCAT-server/share/xcat/netboot/rh/genimage b/xCAT-server/share/xcat/netboot/rh/genimage index 6063bba3d..102411566 100755 --- a/xCAT-server/share/xcat/netboot/rh/genimage +++ b/xCAT-server/share/xcat/netboot/rh/genimage @@ -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;