mirror of
https://github.com/rancher/os.git
synced 2025-09-01 23:04:41 +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:
@@ -33,6 +33,7 @@ RUN rm /sbin/poweroff /sbin/reboot /sbin/halt && \
|
|||||||
echo '%sudo ALL=(ALL) ALL' >> /etc/sudoers
|
echo '%sudo ALL=(ALL) ALL' >> /etc/sudoers
|
||||||
COPY inputrc /etc/inputrc
|
COPY inputrc /etc/inputrc
|
||||||
COPY growpart /usr/bin/growpart
|
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 && \
|
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 -e 's/duid/clientid/g' /etc/dhcpcd.conf && \
|
||||||
sed -i 1,10d /etc/rsyslog.conf && \
|
sed -i 1,10d /etc/rsyslog.conf && \
|
||||||
|
6
images/01-base/start_ntp.sh
Executable file
6
images/01-base/start_ntp.sh
Executable 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
|
@@ -193,7 +193,7 @@ rancher:
|
|||||||
- /usr/bin/iptables:/sbin/iptables:ro
|
- /usr/bin/iptables:/sbin/iptables:ro
|
||||||
ntp:
|
ntp:
|
||||||
image: {{.OS_REPO}}/os-base:{{.VERSION}}{{.SUFFIX}}
|
image: {{.OS_REPO}}/os-base:{{.VERSION}}{{.SUFFIX}}
|
||||||
command: ntpd --nofork -g
|
command: /bin/start_ntp.sh
|
||||||
labels:
|
labels:
|
||||||
io.rancher.os.scope: system
|
io.rancher.os.scope: system
|
||||||
io.rancher.os.after: network
|
io.rancher.os.after: network
|
||||||
|
@@ -21,12 +21,7 @@ fi
|
|||||||
# build kexec
|
# build kexec
|
||||||
pushd .
|
pushd .
|
||||||
cd scripts/installer/kexec
|
cd scripts/installer/kexec
|
||||||
echo Downloading dapper
|
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
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user