[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible Debian: refactor and don't fail if ntpd ain't running
Holger Levsen
holger at layer-acht.org
Sat Jan 21 14:33:54 UTC 2017
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 746426557751daf9705d0ac0b0750d13e5d37a41
Author: Holger Levsen <holger at layer-acht.org>
Date: Sat Jan 21 15:33:32 2017 +0100
reproducible Debian: refactor and don't fail if ntpd ain't running
Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
update_jdn.sh | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/update_jdn.sh b/update_jdn.sh
index a861f11..abbced0 100755
--- a/update_jdn.sh
+++ b/update_jdn.sh
@@ -26,7 +26,11 @@ explain() {
echo "$HOSTNAME: $1"
}
-
+set_correct_date() {
+ # set correct date
+ sudo service ntp stop || true
+ sudo ntpdate -b de.pool.ntp.org
+}
echo "--------------------------------------------"
explain "$(date) - begin deployment update."
@@ -35,13 +39,11 @@ explain "$(date) - begin deployment update."
case $HOSTNAME in
profitbricks-build4-amd64|profitbricks-build5-amd64|profitbricks-build6-i386|profitbricks-build15-amd64|profitbricks-build16-i386)
# set correct date
- sudo service ntp stop
- sudo ntpdate -b de.pool.ntp.org
+ set_correct_date
;;
codethink-sled9*|codethink-sled11*|codethink-sled13*|codethink-sled15*)
# set correct date
- sudo service ntp stop
- sudo ntpdate -b de.pool.ntp.org
+ set_correct_date
;;
*) ;;
esac
--
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