2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-10-24 07:55:31 +00:00

Add NTP to suse15 profile

This commit is contained in:
Jarrod Johnson
2020-07-09 13:37:50 -04:00
parent 50661b7dee
commit d2c999b01c
2 changed files with 9 additions and 1 deletions

View File

@@ -16,6 +16,7 @@ dynamic behavior and replace with static configuration.
<confirm config:type="boolean">false</confirm>
</mode>
</general>
%%NTPCFG%%
%%IFSLE%%
<add-on>
<add_on_products config:type="list">

View File

@@ -27,5 +27,12 @@ done
/usr/sbin/sshd
curl -f https://$mgr/confluent-public/os/$profile/scripts/functions > /tmp/functions
. /tmp/functions
ntpcfg=""
if grep ^ntpservers: /etc/confluent/confluent.deploycfg > /dev/null; then
echo '<ntp-client><ntp_servers config:type="list">' > /tmp/ntp.cfg
sed -n '/^ntpservers:/,/^[^-]/p' /etc/confluent/confluent.deploycfg | sed 1d|sed '$d'| sed -e 's/^- /<ntp_server><address>/' -e 's!$!</address></ntp_server>!' >> /tmp/ntp.cfg
echo '</ntp_servers></ntp-client>' >> /tmp/ntp.cfg
ntpcfg='<xi:include href="file:///tmp/ntp.cfg"/>'
fi
run_remote_python getinstalldisk
sed -e s!%%INSTDISK%%!/dev/$(cat /tmp/installdisk)! -e s!%%NODENAME%%!$nodename! -e "s?%%ROOTPASSWORD%%?${rootpw}?" /tmp/profile/autoinst.xml > /tmp/profile/modified.xml
sed -e s!%%INSTDISK%%!/dev/$(cat /tmp/installdisk)! -e s!%%NODENAME%%!$nodename! -e s!%%NTPCFG%%!$ntpcfg! -e "s?%%ROOTPASSWORD%%?${rootpw}?" /tmp/profile/autoinst.xml > /tmp/profile/modified.xml