From 8bc040c70b0ef8655495dc741c0cb3eb3152f9ed Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Tue, 13 Jun 2017 23:48:43 +0200 Subject: reproducible Debian: add check for writeable /tmp Signed-off-by: Holger Levsen --- bin/reproducible_node_health_check.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 @@ -37,6 +37,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 # -- cgit v1.2.3-70-g09d2