[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible: don't fail if systemd ain't running
Holger Levsen
holger at moszumanska.debian.org
Sat Nov 28 11:07:22 UTC 2015
This is an automated email from the git hooks/post-receive script.
holger pushed a commit to branch master
in repository jenkins.debian.net.
commit 5b7efc9513726b80e03da1960353abcd18b98682
Author: Holger Levsen <holger at layer-acht.org>
Date: Sat Nov 28 12:07:11 2015 +0100
reproducible: don't fail if systemd ain't running
---
hosts/profitbricks-build5-amd64/etc/rc.local | 10 +++++++---
hosts/profitbricks-build6-amd64/etc/rc.local | 10 +++++++---
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/hosts/profitbricks-build5-amd64/etc/rc.local b/hosts/profitbricks-build5-amd64/etc/rc.local
index 3234378..f1e902d 100755
--- a/hosts/profitbricks-build5-amd64/etc/rc.local
+++ b/hosts/profitbricks-build5-amd64/etc/rc.local
@@ -13,15 +13,19 @@
echo "$(date) - system was rebooted" | mail -s "$(hostname -f) rebooted" root
+# disable systemd date services (and don't fail if systemd ain't running)
systemctl disable systemd-timesyncd
systemctl disable systemd-timedated
-systemctl stop systemd-timesyncd
-systemctl stop systemd-timedated
+systemctl stop systemd-timesyncd || true
+systemctl stop systemd-timedated || true
+# set correct date
ntpdate -b de.pool.ntp.org
+# set fake date
date --set="+398 days +6 hours + 23 minutes"
-echo "$(date) - system is running in the future now" | mail -s "$(hostname -f) in the future" root
# disable check for outdated packages as in the future (like this)
# packages from security.d.o will appear outdated always…
ln -sf /bin/true /usr/local/bin/dsa-check-packages
+# finally report success
+echo "$(date) - system is running in the future now" | mail -s "$(hostname -f) in the future" root
exit 0
diff --git a/hosts/profitbricks-build6-amd64/etc/rc.local b/hosts/profitbricks-build6-amd64/etc/rc.local
index 3234378..f1e902d 100755
--- a/hosts/profitbricks-build6-amd64/etc/rc.local
+++ b/hosts/profitbricks-build6-amd64/etc/rc.local
@@ -13,15 +13,19 @@
echo "$(date) - system was rebooted" | mail -s "$(hostname -f) rebooted" root
+# disable systemd date services (and don't fail if systemd ain't running)
systemctl disable systemd-timesyncd
systemctl disable systemd-timedated
-systemctl stop systemd-timesyncd
-systemctl stop systemd-timedated
+systemctl stop systemd-timesyncd || true
+systemctl stop systemd-timedated || true
+# set correct date
ntpdate -b de.pool.ntp.org
+# set fake date
date --set="+398 days +6 hours + 23 minutes"
-echo "$(date) - system is running in the future now" | mail -s "$(hostname -f) in the future" root
# disable check for outdated packages as in the future (like this)
# packages from security.d.o will appear outdated always…
ln -sf /bin/true /usr/local/bin/dsa-check-packages
+# finally report success
+echo "$(date) - system is running in the future now" | mail -s "$(hostname -f) in the future" root
exit 0
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git
More information about the Qa-jenkins-scm
mailing list