diff --git a/tools/rc.local.sh b/tools/rc.local.sh index 52b1972456cead415377b1b7fd6959d7abd41dec..de4168640d530a22fca65ccec7f71f3bc06daf40 100755 --- a/tools/rc.local.sh +++ b/tools/rc.local.sh @@ -65,6 +65,7 @@ done # Mount all partitions read-only echo "Mounting all available partitions read-only ..." +chmod o+rx /mnt for PART in /dev/disk/by-id/*; do DEVICE="$( readlink -f "$PART" )" if ! grep -q "^$DEVICE " /etc/mtab; then @@ -138,7 +139,7 @@ for SWP in /mnt/localfs/*/mindstorms.swp; do done # Remove work directory if not mounted -if [! mountpoint -q /home/mindstorms/work] && [! PERSISTENT]; then +if ! mountpoint -q /home/mindstorms/work && ! PERSISTENT; then echo "Removing work directory as no available mountpoint found." rm -rf /home/mindstorms/work fi @@ -163,6 +164,7 @@ for PART in /mnt/localfs/*; do echo "Unmounting ${PART}." umount "$PART" 2>/dev/null done +chmod o-rx /mnt # HACK: re-enable gnome's automount functionality. echo "Re-enabling gnome's automount functionality ..."