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;