summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-12-10 00:17:31 +0100
committerHolger Levsen <holger@layer-acht.org>2015-12-10 00:17:31 +0100
commite83a85b678693a3950107c192105620b2fac7bf4 (patch)
treef716f6e32bef5e9b68110a1e1f27f883c0332820
parentb8d275017bc291bf0e3fa5938e20a591c70b3fa1 (diff)
downloadjenkins.debian.net-e83a85b678693a3950107c192105620b2fac7bf4.tar.xz
reproducible: on systems running in the future: reset date to real date at the beginning of deployments, and reset back to the future at the end
-rwxr-xr-xupdate_jdn.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/update_jdn.sh b/update_jdn.sh
index 77f690ce..50a6b634 100755
--- a/update_jdn.sh
+++ b/update_jdn.sh
@@ -15,6 +15,16 @@ explain() {
echo "--------------------------------------------"
explain "$(date) - begin deployment update."
+
+# run update at current date
+case $HOSTNAME in
+ profitbricks-build5-amd64|profitbricks-build6-amd64)
+ # set correct date
+ sudo ntpdate -b de.pool.ntp.org
+ ;;
+ *) ;;
+esac
+
#
# set up users and groups
#
@@ -496,3 +506,10 @@ rm -f $TMPFILE
sudo touch $STAMP # so on the next run, only configs newer than this file will be updated
explain "$(date) - finished deployment."
+# set time back to the future
+case $HOSTNAME in
+ profitbricks-build5-amd64|profitbricks-build6-amd64)
+ sudo date --set="+398 days +6 hours + 23 minutes"
+ ;;
+ *) ;;
+esac