ROMFS: rcS: check for updated ext_autostart and rename if existing

This allows to inject an updated ext_autostart folder with the name
ext_autostart_new, and then PX4 takes care of renaming it to
ext_autostart during bootup.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
Silvan Fuhrer 2023-10-02 15:15:01 +02:00 committed by Beat Küng
parent 745709717e
commit cad595cb5c
1 changed files with 8 additions and 0 deletions

View File

@ -93,6 +93,14 @@ then
fi
fi
# Check for an update of the ext_autostart folder, and replace the old one with it
if [ -e /fs/microsd/ext_autostart_new ]
then
echo "Updating external autostart files"
rm -r $SDCARD_EXT_PATH
mv /fs/microsd/ext_autostart_new $SDCARD_EXT_PATH
fi
set PARAM_FILE /fs/microsd/params
set PARAM_BACKUP_FILE "/fs/microsd/parameters_backup.bson"
fi