description "Clean the /media/zoox directory at boot."

# When an AI machine is hard-cycled, disks mounted via the upstart
# script zooxdata-mount are not unmounted properly, leaving a dangling
# directory which may get picked up by the vehicle logging system.
# This script will clean those directories from /media/zoox very early
# in the boot process.

start on mounted MOUNTPOINT=/

task

exec rmdir --ignore-fail-on-non-empty /media/zoox/zooxdata*
