1
0
mirror of https://github.com/rancher/os.git synced 2025-08-31 06:11:12 +00:00

Merge pull request #2023 from SvenDowideit/v1.0.x-fix-ntpd-for-large-time-differences

Merge pull request #1997 from SvenDowideit/fix-ntpd-for-large-time-di…
This commit is contained in:
Sven Dowideit
2017-07-31 20:52:17 +10:00
committed by GitHub
4 changed files with 9 additions and 7 deletions

View File

@@ -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 && \

6
images/01-base/start_ntp.sh Executable file
View File

@@ -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

View File

@@ -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

View File

@@ -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