[Qa-jenkins-scm] [jenkins.debian.net] 01/02: fail clearly if node is running on read-only filesystem

Holger Levsen holger at layer-acht.org
Tue Jun 13 18:39:42 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 11c25faaec8b4feef7d60873bac1697a59688bbb
Author: Holger Levsen <holger at layer-acht.org>
Date:   Tue Jun 13 20:37:21 2017 +0200

    fail clearly if node is running on read-only filesystem
    
    Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
 bin/common-functions.sh | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/bin/common-functions.sh b/bin/common-functions.sh
index 5d0c90d..ee7336a 100755
--- a/bin/common-functions.sh
+++ b/bin/common-functions.sh
@@ -68,6 +68,10 @@ if [ "${0:0:5}" != "/tmp/" ] ; then
 	esac
 	# mktemp some place for us...
 	TTT=$(mktemp --tmpdir=/tmp jenkins-script-XXXXXXXX)
+	if [ -z "$TTT" ] ; then
+		echo "Failed to create tmpfile, aborting. (Probably due to read-only filesystem…)"
+		exit 1
+	fi
 	# prepare cleanup
 	trap common_cleanup INT TERM EXIT
 	# cp $0 to /tmp and run it from there

-- 
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