From cad595cb5c599522a242e3469f4e5ecb7c74ff50 Mon Sep 17 00:00:00 2001 From: Silvan Fuhrer Date: Mon, 2 Oct 2023 15:15:01 +0200 Subject: [PATCH] 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 --- ROMFS/px4fmu_common/init.d/rcS | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ROMFS/px4fmu_common/init.d/rcS b/ROMFS/px4fmu_common/init.d/rcS index 4a391d39f9..7d53e5b71d 100644 --- a/ROMFS/px4fmu_common/init.d/rcS +++ b/ROMFS/px4fmu_common/init.d/rcS @@ -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