From d2c999b01c45c53406e8945dec714579119e51da Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 9 Jul 2020 13:37:50 -0400 Subject: [PATCH] Add NTP to suse15 profile --- confluent_osdeploy/suse15/profiles/hpc/autoyast | 1 + confluent_osdeploy/suse15/profiles/hpc/scripts/pre.sh | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/confluent_osdeploy/suse15/profiles/hpc/autoyast b/confluent_osdeploy/suse15/profiles/hpc/autoyast index 90f0c48b..2aedb478 100644 --- a/confluent_osdeploy/suse15/profiles/hpc/autoyast +++ b/confluent_osdeploy/suse15/profiles/hpc/autoyast @@ -16,6 +16,7 @@ dynamic behavior and replace with static configuration. false + %%NTPCFG%% %%IFSLE%% diff --git a/confluent_osdeploy/suse15/profiles/hpc/scripts/pre.sh b/confluent_osdeploy/suse15/profiles/hpc/scripts/pre.sh index 0bbd1ecc..32936841 100644 --- a/confluent_osdeploy/suse15/profiles/hpc/scripts/pre.sh +++ b/confluent_osdeploy/suse15/profiles/hpc/scripts/pre.sh @@ -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 '' > /tmp/ntp.cfg + sed -n '/^ntpservers:/,/^[^-]/p' /etc/confluent/confluent.deploycfg | sed 1d|sed '$d'| sed -e 's/^- /
/' -e 's!$!
!' >> /tmp/ntp.cfg + echo '
' >> /tmp/ntp.cfg + ntpcfg='' +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