Commit 060817f9 authored by Holger Levsen's avatar Holger Levsen

reproducible: use time.osuosl.org as ntp server for OSUOSL nodes, de.pool.ntp.org for the rest

Signed-off-by: Holger Levsen's avatarHolger Levsen <holger@layer-acht.org>
parent aed95eb6
......@@ -218,7 +218,11 @@ for i in "${HOSTS[@]}" ; do
if $reset_clock ; then
if node_in_the_future "$i" ; then
# set correct future date
remote_command="sudo ntpdate -b de.pool.ntp.org && $remote_command && sudo date --set=\"+398 days +6 hours + 23 minutes\" && echo '__$(echo $i|cut -d '.' -f1)=ok__'"
case "$i" in
osuosl-build*) NTP_SERVER=de.pool.ntp.org ;;
*) NTP_SERVER=time.osuosl.org ;;
esac
remote_command="sudo ntpdate -b $NTP_SERVER && $remote_command && sudo date --set=\"+398 days +6 hours + 23 minutes\" && echo '__$(echo $i|cut -d '.' -f1)=ok__'"
fi
fi
get_arch_color $i
......
......@@ -19,7 +19,11 @@ send_back_to_the_future() {
systemctl stop systemd-timedated || true
systemctl stop ntp.service || true
# set correct date
ntpdate -b de.pool.ntp.org
if [ -z "$1" ] ; then
ntpdate -b de.pool.ntp.org
else
ntpdate -b $1
fi
# set fake date
date --set="+398 days +6 hours + 23 minutes"
# finally report success
......@@ -104,7 +108,7 @@ case $(hostname) in
profitbricks-build6*) send_back_to_the_future ;;
profitbricks-build15*) send_back_to_the_future ;;
profitbricks-build16*) send_back_to_the_future ;;
osuosl-build170*) send_back_to_the_future ;;
osuosl-build170*) send_back_to_the_future time.osuosl.org;;
*) ;;
esac
......
......@@ -47,7 +47,7 @@ explain() {
set_correct_date() {
# set correct date
sudo service ntp stop || true
sudo ntpdate -b de.pool.ntp.org
sudo ntpdate -b $1
}
disable_dsa_check_packages() {
......@@ -72,15 +72,15 @@ fi
case $HOSTNAME in
profitbricks-build4-amd64|profitbricks-build5-amd64|profitbricks-build6-i386|profitbricks-build15-amd64|profitbricks-build16-i386)
# set correct date
set_correct_date
set_correct_date de.pool.ntp.org
;;
codethink-sled9*|codethink-sled11*|codethink-sled13*|codethink-sled15*)
# set correct date
set_correct_date
set_correct_date de.pool.ntp.org
;;
osuosl-build170-amd64)
# set correct date
set_correct_date
set_correct_date time.osuosl.org
;;
*) ;;
esac
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment