diff options
author | Holger Levsen <holger@layer-acht.org> | 2017-06-13 23:48:43 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2017-06-13 23:48:43 +0200 |
commit | 8bc040c70b0ef8655495dc741c0cb3eb3152f9ed (patch) | |
tree | e568db2d30cdecc65ee83bb24062a3d1c9eeb99f /bin | |
parent | 0baff9b1582aaed26ffe961a418896eed91ed77f (diff) | |
download | jenkins.debian.net-8bc040c70b0ef8655495dc741c0cb3eb3152f9ed.tar.xz |
reproducible Debian: add check for writeable /tmp
Signed-off-by: Holger Levsen <holger@layer-acht.org>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/reproducible_node_health_check.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/bin/reproducible_node_health_check.sh b/bin/reproducible_node_health_check.sh index 6f6f71ba..9936a0f4 100755 --- a/bin/reproducible_node_health_check.sh +++ b/bin/reproducible_node_health_check.sh @@ -38,6 +38,17 @@ show_fstab_and_mounts() { set -e # +# is the filesystem writetable? +# +echo "$(date -u) - testing whether /tmp is writable..." +$TEST=$(mktemp --tmpdir=/tmp rwtest-XXXXXX) +if [ -z "$TEST" ] ; then + echo "Failure to write a file in /tmp, assuming read-only filesystem." + exit 1 +fi +rm $TEST > /dev/null + +# # check for /dev/shm being mounted properly # echo "$(date -u) - testing whether /dev/shm is mounted correctly..." |