diff --git a/confluent_osdeploy/ubuntu20.04/profiles/default/scripts/post.sh b/confluent_osdeploy/ubuntu20.04/profiles/default/scripts/post.sh index 78a6acb9..81038f73 100755 --- a/confluent_osdeploy/ubuntu20.04/profiles/default/scripts/post.sh +++ b/confluent_osdeploy/ubuntu20.04/profiles/default/scripts/post.sh @@ -24,6 +24,10 @@ curl -f https://$mgr/confluent-public/os/$profile/scripts/firstboot.sh > /target chmod +x /target/etc/confluent/firstboot.sh cp /tmp/allnodes /target/root/.shosts cp /tmp/allnodes /target/etc/ssh/shosts.equiv +if grep ^ntpservers: /target/etc/confluent/confluent.deploycfg > /dev/null; then + ntps=$(sed -n '/^ntpservers:/,/^[^-]/p' /target/etc/confluent/confluent.deploycfg|sed 1d|sed '$d' | sed -e 's/^- //' | paste -sd ' ' + sed -e "s/#NTP=/NTP=$ntps/" /target/etc/systemd/timesyncd.conf +fi textcons=$(grep ^textconsole: /target/etc/confluent/confluent.deploycfg |awk '{print $2}') if [ "$textcons" = "true" ] && ! grep console= /proc/cmdline > /dev/null; then cons=""