diff options
author | Holger Levsen <holger@layer-acht.org> | 2017-06-13 20:37:21 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2017-06-13 20:37:21 +0200 |
commit | 11c25faaec8b4feef7d60873bac1697a59688bbb (patch) | |
tree | 477bdf2c443091187f5ce46d6984308f623c9539 /bin | |
parent | d7d9b1a509648fba4ba640f71f293fef18413713 (diff) | |
download | jenkins.debian.net-11c25faaec8b4feef7d60873bac1697a59688bbb.tar.xz |
fail clearly if node is running on read-only filesystem
Signed-off-by: Holger Levsen <holger@layer-acht.org>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/common-functions.sh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bin/common-functions.sh b/bin/common-functions.sh index 5d0c90d9..ee7336ac 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 |