summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/mount-store9
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/mount-store b/scripts/mount-store
index 4251926..5842d23 100755
--- a/scripts/mount-store
+++ b/scripts/mount-store
@@ -80,6 +80,15 @@ if [ "$RET" == "0" ]; then
for DIR in $(find "$DEST" -type d); do
chmod ug+x "$DIR" 2>/dev/null
done
+ TEST="$DEST/.test-$RAND-$RAND"
+ sudo -n -u bwlehrpool touch "$TEST"
+ RET=$?
+ if [ -e "$TEST" ]; then
+ sudo -n -u bwlehrpool rm -f "$TEST"
+ else
+ echo "Error: Mounted share is not writable, aborting." >&2
+ umount -v "$DEST"
+ fi
fi
exit $RET