From 64f57dceaf903ffd897ad0d22fec3c3950d3d77c Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 9 Jul 2020 15:51:19 -0400 Subject: [PATCH] Fix ubuntu NTP configuration --- .../ubuntu20.04/profiles/default/scripts/post.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/confluent_osdeploy/ubuntu20.04/profiles/default/scripts/post.sh b/confluent_osdeploy/ubuntu20.04/profiles/default/scripts/post.sh index 81038f73..9d84776c 100755 --- a/confluent_osdeploy/ubuntu20.04/profiles/default/scripts/post.sh +++ b/confluent_osdeploy/ubuntu20.04/profiles/default/scripts/post.sh @@ -25,8 +25,8 @@ 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 + ntps=$(sed -n '/^ntpservers:/,/^[^-]/p' /target/etc/confluent/confluent.deploycfg|sed 1d|sed '$d' | sed -e 's/^- //' | paste -sd ' ') + sed -i "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