mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-09-29 21:48:11 +00:00
Improve genimage AlmaLinux support
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user