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 27, 2024
1 parent e2dee7d commit ed95a41
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 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
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ network --device=00-f0-54-1a-7e-e0 --hostname snapshot-ipv4-dhcp-rhel9 --noipv6
rootpw --iscrypted $1$rtd8Ub7R$5Ohzuy8WXlkaK9cA2T1wb0
firewall --service=ssh
authselect --useshadow --passalgo=sha512 --kickstart
timezone --utc UTC
timezone --utc UTC

services --disabled gpm,sendmail,cups,pcmcia,isdn,rawdevices,hpoj,bluetooth,openibd,avahi-daemon,avahi-dnsconfd,hidd,hplip,pcscd

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ network --device=00-f0-54-1a-7e-e0 --hostname snapshot-ipv4-dhcp-rocky9 --noipv6
rootpw --iscrypted $1$rtd8Ub7R$5Ohzuy8WXlkaK9cA2T1wb0
firewall --service=ssh
authselect --useshadow --passalgo=sha512 --kickstart
timezone --utc UTC
timezone --utc UTC

services --disabled gpm,sendmail,cups,pcmcia,isdn,rawdevices,hpoj,bluetooth,openibd,avahi-daemon,avahi-dnsconfd,hidd,hplip,pcscd

Expand Down

0 comments on commit ed95a41

Please sign in to comment.