ROMFS: microsd prevent MacOS and Ubuntu trash and indexing files

This commit is contained in:
Daniel Agar
2020-06-08 16:57:28 -04:00
committed by GitHub
parent 5507c15bdc
commit a83e75ee10

View File

@@ -101,6 +101,33 @@ then
hardfault_log reset
fi
fi
# Prevent MacOS and Ubuntu from creating unnecessary temporary files on the microSD card
# block MacOS Spotlight indexing (.Spotlight-V100 folder)
if [ ! -f "/fs/microsd/.metadata_never_index" ]; then
cat > /fs/microsd/.metadata_never_index
fi
# block MacOS trashes
if [ ! -f "/fs/microsd/.Trashes" ]; then
cat > /fs/microsd/.Trashes
fi
# block MacOS logging of filesystem events
if [ ! -d "/fs/microsd/.fseventsd" ]; then
mkdir /fs/microsd/.fseventsd
fi
if [ ! -f "/fs/microsd/.fseventsd/no_log" ]; then
cat > /fs/microsd/.fseventsd/no_log
fi
# block Ubuntu trash
if [ ! -f "/fs/microsd/.Trash-1000" ]; then
cat > /fs/microsd/.Trash-1000
fi
else
# tune SD_INIT
set STARTUP_TUNE 16