From d98a6a4db9382cc02ead7cc78e189ff63348ed05 Mon Sep 17 00:00:00 2001
From: Dominik Mehlem <mehlem@ient.rwth-aachen.de>
Date: Fri, 3 Dec 2021 09:53:02 +0100
Subject: [PATCH] adapt rc.local.sh to work with mindstorms.startup directory

---
 tools/rc.local.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/rc.local.sh b/tools/rc.local.sh
index 52b1972..de41686 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 ..."
-- 
GitLab