Skip to content

Commit

Permalink
Fixes #37581 - Refactor timezone and NTP server config in kickstart
Browse files Browse the repository at this point in the history
Add conditional logic to use 'timesource' command,
maintaining compatibility with older versions.
  • Loading branch information
nofaralfasi committed Jun 24, 2024
1 parent e2dee7d commit dcac355
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit dcac355

Please sign in to comment.