From eb8144214fd26ea9e0db7ccd90e3b814af4be9e1 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 9 Jul 2020 16:02:53 -0400 Subject: [PATCH] Add NTP to RHVH profile --- confluent_osdeploy/rhvh4/profiles/default/scripts/pre.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/confluent_osdeploy/rhvh4/profiles/default/scripts/pre.sh b/confluent_osdeploy/rhvh4/profiles/default/scripts/pre.sh index 125e1eb2..71b9f9bf 100644 --- a/confluent_osdeploy/rhvh4/profiles/default/scripts/pre.sh +++ b/confluent_osdeploy/rhvh4/profiles/default/scripts/pre.sh @@ -17,7 +17,11 @@ echo lang $locale > /tmp/langinfo echo keyboard --vckeymap=$keymap >> /tmp/langinfo tz=$(grep ^timezone: /etc/confluent/confluent.deploycfg) tz=${tz#timezone: } -echo timezone $tz --utc > /tmp/timezone +ntpsrvs="" +if grep ^ntpservers: /etc/confluent/confluent.deploycfg > /dev/null; then + ntpsrvs="--ntpservers="$(sed -n '/^ntpservers:/,/^[^-]/p' /etc/confluent/confluent.deploycfg|sed 1d|sed '$d' | sed -e 's/^- //' | paste -sd,) +fi +echo timezone $ntpsrvs $tz --utc > /tmp/timezone rootpw=$(grep ^rootpassword /etc/confluent/confluent.deploycfg | awk '{print $2}') if [ "$rootpw" = null ]; then echo "rootpw --lock" > /tmp/rootpw