mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-06-03 03:50:08 +00:00
Merge pull request #6919 from viniciusferrao/oraclelinux
Support for Oracle Linux 7 and Oracle Linux 8
This commit is contained in:
commit
3651690830
@ -135,6 +135,15 @@ our %distnames = (
|
||||
"1299104542.844706" => "SL6", #x86_64 DVD ISO
|
||||
"1390839789.062069" => "SL6.5", #x86_64 DVD ISO Install
|
||||
|
||||
"1529960248.065311" => "ol6.10", # x86_64, Oracle Linux 6.10
|
||||
"1565395001.564692" => "ol7.7", # x86_64, Oracle Linux 7.7
|
||||
"1586293815.797636" => "ol7.8", # x86_64, Oracle Linux 7.8
|
||||
"1601956087.745957" => "ol7.9", # x86_64, Oracle Linux 7.9
|
||||
"1563868563.575621" => "ol8.0", # x86_64, Oracle Linux 8.0
|
||||
"1573718260.172018" => "ol8.1", # x86_64, Oracle Linux 8.1
|
||||
"1588679121.349755" => "ol8.2", # x86_64, Oracle Linux 8.2
|
||||
"1604965593.730885" => "ol8.3", # x86_64, Oracle Linux 8.3
|
||||
|
||||
"1394111947.452332" => "pkvm2.1", # ppc64, PowerKVM
|
||||
"1413749127.352649" => "pkvm2.1.1", # ppc64, PowerKVM
|
||||
);
|
||||
|
@ -299,7 +299,7 @@ sub subvars {
|
||||
my $writerepo;
|
||||
my $c = 0;
|
||||
foreach my $pkgdir (@pkgdirs) {
|
||||
if ($platform =~ /^(rh|SL|centos|fedora)$/) {
|
||||
if ($platform =~ /^(rh|SL|centos|ol|fedora)$/) {
|
||||
if ($c == 0) {
|
||||
# After some tests, if we put the repo in pre scripts in the kickstart like for rhels6.x
|
||||
# the rhels5.9 will not be installed successfully. So put in kickstart directly.
|
||||
|
1
xCAT-server/share/xcat/install/ol/compute.ol7.pkglist
Symbolic link
1
xCAT-server/share/xcat/install/ol/compute.ol7.pkglist
Symbolic link
@ -0,0 +1 @@
|
||||
../rh/compute.rhels7.pkglist
|
1
xCAT-server/share/xcat/install/ol/compute.ol7.tmpl
Symbolic link
1
xCAT-server/share/xcat/install/ol/compute.ol7.tmpl
Symbolic link
@ -0,0 +1 @@
|
||||
../rh/compute.rhels7.tmpl
|
1
xCAT-server/share/xcat/install/ol/compute.ol8.pkglist
Symbolic link
1
xCAT-server/share/xcat/install/ol/compute.ol8.pkglist
Symbolic link
@ -0,0 +1 @@
|
||||
../rh/compute.rhels8.pkglist
|
59
xCAT-server/share/xcat/install/ol/compute.ol8.tmpl
Normal file
59
xCAT-server/share/xcat/install/ol/compute.ol8.tmpl
Normal file
@ -0,0 +1,59 @@
|
||||
#version=OL8
|
||||
# Use text install
|
||||
text
|
||||
# Use network installation
|
||||
%include /tmp/repos
|
||||
# Keyboard layouts
|
||||
keyboard --vckeymap=us --xlayouts='us'
|
||||
# System language
|
||||
lang en_US.UTF-8
|
||||
|
||||
# Network information
|
||||
#KICKSTARTNET#
|
||||
# Root password
|
||||
rootpw --iscrypted #CRYPT:passwd:key=system,username=root:password#
|
||||
# Not run the Setup Agent on first boot
|
||||
firstboot --disable
|
||||
# Do not configure the X Window System
|
||||
skipx
|
||||
# System services
|
||||
#services --enabled="chronyd"
|
||||
# System timezone
|
||||
timezone #TABLE:site:key=timezone:value# --isUtc
|
||||
# Partition clearing information
|
||||
zerombr
|
||||
clearpart --all --initlabel
|
||||
#XCAT_PARTITION_START#
|
||||
%include /tmp/partitionfile
|
||||
#XCAT_PARTITION_END#
|
||||
|
||||
# Do not configure any iptables rules
|
||||
firewall --disable
|
||||
selinux --disable
|
||||
reboot
|
||||
|
||||
%packages
|
||||
#INCLUDE_DEFAULT_PKGLIST#
|
||||
|
||||
%end
|
||||
|
||||
%anaconda
|
||||
pwpolicy root --minlen=6 --minquality=1 --notstrict --nochanges --emptyok
|
||||
pwpolicy user --minlen=6 --minquality=1 --notstrict --nochanges --emptyok
|
||||
pwpolicy luks --minlen=6 --minquality=1 --notstrict --nochanges --emptyok
|
||||
%end
|
||||
%pre
|
||||
{
|
||||
echo "Running Kickstart Pre-installation script..."
|
||||
#INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/pre.rhels8#
|
||||
} &>>/tmp/pre-install.log
|
||||
%end
|
||||
%post --interpreter=/bin/bash
|
||||
mkdir -p /var/log/xcat/
|
||||
cat /tmp/pre-install.log >>/var/log/xcat/xcat.log
|
||||
{
|
||||
echo "Running Kickstart Post-installation script..."
|
||||
#INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/post.xcat.ng#
|
||||
#INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/post.rhels8#
|
||||
} &>>/var/log/xcat/xcat.log
|
||||
%end
|
1
xCAT-server/share/xcat/netboot/ol/compute.ol7.x86_64.exlist
Symbolic link
1
xCAT-server/share/xcat/netboot/ol/compute.ol7.x86_64.exlist
Symbolic link
@ -0,0 +1 @@
|
||||
../rh/compute.rhels7.x86_64.exlist
|
1
xCAT-server/share/xcat/netboot/ol/compute.ol7.x86_64.pkglist
Symbolic link
1
xCAT-server/share/xcat/netboot/ol/compute.ol7.x86_64.pkglist
Symbolic link
@ -0,0 +1 @@
|
||||
../rh/compute.rhels7.x86_64.pkglist
|
1
xCAT-server/share/xcat/netboot/ol/compute.ol7.x86_64.postinstall
Symbolic link
1
xCAT-server/share/xcat/netboot/ol/compute.ol7.x86_64.postinstall
Symbolic link
@ -0,0 +1 @@
|
||||
../rh/compute.rhels7.x86_64.postinstall
|
1
xCAT-server/share/xcat/netboot/ol/compute.ol8.x86_64.exlist
Symbolic link
1
xCAT-server/share/xcat/netboot/ol/compute.ol8.x86_64.exlist
Symbolic link
@ -0,0 +1 @@
|
||||
../rh/compute.rhels8.x86_64.exlist
|
1
xCAT-server/share/xcat/netboot/ol/compute.ol8.x86_64.pkglist
Symbolic link
1
xCAT-server/share/xcat/netboot/ol/compute.ol8.x86_64.pkglist
Symbolic link
@ -0,0 +1 @@
|
||||
../rh/compute.rhels8.x86_64.pkglist
|
1
xCAT-server/share/xcat/netboot/ol/compute.ol8.x86_64.postinstall
Symbolic link
1
xCAT-server/share/xcat/netboot/ol/compute.ol8.x86_64.postinstall
Symbolic link
@ -0,0 +1 @@
|
||||
../rh/compute.rhels8.x86_64.postinstall
|
1
xCAT-server/share/xcat/netboot/ol/dracut_047
Symbolic link
1
xCAT-server/share/xcat/netboot/ol/dracut_047
Symbolic link
@ -0,0 +1 @@
|
||||
../rh/dracut_047
|
1
xCAT-server/share/xcat/netboot/ol/geninitrd
Symbolic link
1
xCAT-server/share/xcat/netboot/ol/geninitrd
Symbolic link
@ -0,0 +1 @@
|
||||
../rh/geninitrd
|
@ -365,6 +365,14 @@ if($onlyinitrd){
|
||||
$yumcmd .= "--setopt=module_platform_id=platform:el" . $majorrel . " ";
|
||||
}
|
||||
}
|
||||
|
||||
if ($osver =~ /^ol\D*(\d*)[.\d]*.*$/) {
|
||||
$majorrel = $1;
|
||||
if ($majorrel > 7) {
|
||||
$yumcmd .= "--releasever=" . $majorrel . " ";
|
||||
$yumcmd .= "--setopt=module_platform_id=platform:el" . $majorrel . " ";
|
||||
}
|
||||
}
|
||||
|
||||
foreach (0 .. $repnum) {
|
||||
$yumcmd .= "--enablerepo=$osver-$arch-$_ ";
|
||||
@ -784,6 +792,18 @@ if (-e "$rootimg_dir/etc/yum.repos.d/CentOS-Base.repo") {
|
||||
}
|
||||
#
|
||||
|
||||
#-- Oracle Linux, disable internet repositories
|
||||
if (-e "$rootimg_dir/etc/yum.repos.d/oracle-linux-ol8.repo") {
|
||||
my $repo_content = `sed -e '/enabled/d' $rootimg_dir/etc/yum.repos.d/oracle-linux-ol8.repo | sed -e '/^gpgkey/i enabled=0'`;
|
||||
system("echo '$repo_content' > $rootimg_dir/etc/yum.repos.d/oracle-linux-ol8.repo");
|
||||
}
|
||||
|
||||
if (-e "$rootimg_dir/etc/yum.repos.d/uek-ol8.repo") {
|
||||
my $repo_content = `sed -e '/enabled/d' $rootimg_dir/etc/yum.repos.d/uek-ol8.repo | sed -e '/^gpgkey/i enabled=0'`;
|
||||
system("echo '$repo_content' > $rootimg_dir/etc/yum.repos.d/uek-ol8.repo");
|
||||
}
|
||||
#
|
||||
|
||||
#-- run postinstall script
|
||||
unless ($imagename) {
|
||||
$postinstall_filename = imgutils::get_profile_def_filename($osver, $profile, $arch, $customdir, "postinstall");
|
||||
@ -1005,6 +1025,11 @@ sub mkinitrd_dracut {
|
||||
$dracutmoduledir = "$rootimg_dir/usr/lib/dracut/modules.d/";
|
||||
}
|
||||
|
||||
# For whatever reasons Oracle Linux have both /usr/lib/dracut and /usr/share/dracut folders
|
||||
# so we just check if it /etc/oracle-release exists and force the correct path
|
||||
if ((-f "$rootimg_dir/etc/oracle-release")) {
|
||||
$dracutmoduledir = "$rootimg_dir/usr/lib/dracut/modules.d/";
|
||||
}
|
||||
|
||||
if ($dracutver >= "033") {
|
||||
my $perm = (stat("$fullpath/$dracutdir/patch/syslog/module-setup.sh"))[2];
|
||||
@ -1950,6 +1975,10 @@ sub using_systemd {
|
||||
if ($1 >= 7) {
|
||||
return 1;
|
||||
}
|
||||
} elsif ($os =~ /ol(\d+)/) {
|
||||
if ($1 >= 7) {
|
||||
return 1;
|
||||
}
|
||||
} elsif ($os =~ /rhelhpc(\d+)/) {
|
||||
if ($1 >= 7) {
|
||||
return 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user