From dcac355c22d03fd414dc38f555d9f5daf506fa95 Mon Sep 17 00:00:00 2001 From: nofaralfasi Date: Thu, 20 Jun 2024 18:05:34 +0300 Subject: [PATCH] Fixes #37581 - Refactor timezone and NTP server config in kickstart Add conditional logic to use 'timesource' command, maintaining compatibility with older versions. --- .../provisioning_templates/provision/kickstart_default.erb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/views/unattended/provisioning_templates/provision/kickstart_default.erb b/app/views/unattended/provisioning_templates/provision/kickstart_default.erb index ac1b054d0c8..db6c2e194f1 100644 --- a/app/views/unattended/provisioning_templates/provision/kickstart_default.erb +++ b/app/views/unattended/provisioning_templates/provision/kickstart_default.erb @@ -142,7 +142,14 @@ authselect --useshadow --passalgo=<%= @host.operatingsystem.password_hash.downca <% else -%> authconfig --useshadow --passalgo=<%= @host.operatingsystem.password_hash.downcase || 'sha256' %> --kickstart <% end -%> +<% if rhel_compatible && os_major < 9 -%> timezone --utc <%= host_param('time-zone') || 'UTC' %> <%= host_param('ntp-server') ? "--ntpservers #{host_param('ntp-server')}" : '' %> +<% else -%> +timezone --utc <%= host_param('time-zone') || 'UTC' %> +<% if host_param('ntp-server') -%> +timesource --ntp-server <%= host_param('ntp-server') %> +<% end -%> +<% end -%> <% if rhel_compatible -%> services --disabled gpm,sendmail,cups,pcmcia,isdn,rawdevices,hpoj,bluetooth,openibd,avahi-daemon,avahi-dnsconfd,hidd,hplip,pcscd