Add --purge_shm_base to aos_starter
This removes everything in /dev/shm/aos before doing anything. This
gives us options to use SUID on the roboRIO to become admin and then
clean up the old shm_base as admin. Otherwise, we were getting into a
crash loop.
Change-Id: Ia880af19a63cd30043fe92df3bdb2d13fd08dfb8
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
diff --git a/aos/starter/starter.sh b/aos/starter/starter.sh
index d4281c5..face963 100755
--- a/aos/starter/starter.sh
+++ b/aos/starter/starter.sh
@@ -13,8 +13,7 @@
elif [[ "$(hostname)" == "pi-"* ]]; then
# We have systemd configured to handle restarting, so just exec.
export PATH="${PATH}:/home/pi/bin"
- rm -rf /dev/shm/aos
- exec starterd --user=pi
+ exec starterd --user=pi --purge_shm_base
else
ROBOT_CODE="${HOME}/bin"
fi
@@ -22,6 +21,5 @@
cd "${ROBOT_CODE}"
export PATH="${PATH}:${ROBOT_CODE}"
while true; do
- rm -rf /dev/shm/aos
- starterd 2>&1
+ starterd --purge_shm_base 2>&1
done