Skip to content

Commit cc5ebbb

Browse files
committed
Improve genimage AlmaLinux support
1 parent 6d446a5 commit cc5ebbb

File tree

1 file changed

+5
-9
lines changed
  • xCAT-server/share/xcat/netboot/rh

1 file changed

+5
-9
lines changed

xCAT-server/share/xcat/netboot/rh/genimage

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -372,15 +372,7 @@ if($onlyinitrd){
372372

373373
my $yumcmd = "yum $non_interactive -c /tmp/genimage.$$.yum.conf --installroot=$rootimg_dir/ --disablerepo=* ";
374374

375-
if ($osver =~ /^rhel\D*(\d*)[.\d]*.*$/) {
376-
$majorrel = $1;
377-
if ($majorrel > 7) {
378-
$yumcmd .= "--releasever=" . $majorrel . " ";
379-
$yumcmd .= "--setopt=module_platform_id=platform:el" . $majorrel . " ";
380-
}
381-
}
382-
383-
if ($osver =~ /^ol\D*(\d*)[.\d]*.*$/) {
375+
if ($osver =~ /^(?:rhel|rocky|alma|ol)\D*(\d*)[.\d]*.*$/) {
384376
$majorrel = $1;
385377
if ($majorrel > 7) {
386378
$yumcmd .= "--releasever=" . $majorrel . " ";
@@ -1985,6 +1977,10 @@ sub using_systemd {
19851977
if ($1 >= 8) {
19861978
return 1;
19871979
}
1980+
} elsif ($os =~ /alma(\d+)/) {
1981+
if ($1 >= 8) {
1982+
return 1;
1983+
}
19881984
} elsif ($os =~ /ol(\d+)/) {
19891985
if ($1 >= 7) {
19901986
return 1;

0 commit comments

Comments
 (0)