diff --git a/images/01-base/Dockerfile b/images/01-base/Dockerfile index 2d256536..ed9a3f6e 100644 --- a/images/01-base/Dockerfile +++ b/images/01-base/Dockerfile @@ -33,6 +33,7 @@ RUN rm /sbin/poweroff /sbin/reboot /sbin/halt && \ echo '%sudo ALL=(ALL) ALL' >> /etc/sudoers COPY inputrc /etc/inputrc COPY growpart /usr/bin/growpart +COPY start_ntp.sh /bin/start_ntp.sh RUN sed -i s/"partx --update \"\$part\" \"\$dev\""/"partx --update --nr \"\$part\" \"\$dev\""/g /usr/bin/growpart && \ sed -i -e 's/duid/clientid/g' /etc/dhcpcd.conf && \ sed -i 1,10d /etc/rsyslog.conf && \ diff --git a/images/01-base/start_ntp.sh b/images/01-base/start_ntp.sh new file mode 100755 index 00000000..e3fa385a --- /dev/null +++ b/images/01-base/start_ntp.sh @@ -0,0 +1,6 @@ +#!/bin/sh +set -ex +echo "starting in one shot mode to fix large time differences" +ntpd -gq +echo "starting long running nptd" +exec ntpd --nofork -g diff --git a/os-config.tpl.yml b/os-config.tpl.yml index f255e91b..a9f4ff24 100644 --- a/os-config.tpl.yml +++ b/os-config.tpl.yml @@ -193,7 +193,7 @@ rancher: - /usr/bin/iptables:/sbin/iptables:ro ntp: image: {{.OS_REPO}}/os-base:{{.VERSION}}{{.SUFFIX}} - command: ntpd --nofork -g + command: /bin/start_ntp.sh labels: io.rancher.os.scope: system io.rancher.os.after: network diff --git a/scripts/package-installer b/scripts/package-installer index 9c43b3a0..b4715010 100755 --- a/scripts/package-installer +++ b/scripts/package-installer @@ -21,12 +21,7 @@ fi # build kexec pushd . cd scripts/installer/kexec -echo Downloading dapper -curl -sL https://releases.rancher.com/dapper/latest/dapper-`uname -s`-`uname -m|sed 's/v7l//'` > .dapper.tmp -chmod +x .dapper.tmp -./.dapper.tmp -v -mv .dapper.tmp .dapper -./.dapper +dapper popd