From 7d8bed8a55a15016eed9e9e8393b9b0ab420052f Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Wed, 22 Feb 2017 12:27:49 -0800 Subject: [PATCH] ROMFS: standardize board-override script Standardize on the following sequence for allowing different startup sequences: board-specific file etc/rc on microSD card etc/rc.txt on microSD card Also remove comment about MODE variable that is not used by ArduPilot --- mk/PX4/ROMFS/init.d/rcS | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/mk/PX4/ROMFS/init.d/rcS b/mk/PX4/ROMFS/init.d/rcS index a75f97b731..f3c2a49970 100755 --- a/mk/PX4/ROMFS/init.d/rcS +++ b/mk/PX4/ROMFS/init.d/rcS @@ -13,11 +13,6 @@ # add them to the per-configuration scripts instead. # -# -# Default to auto-start mode. An init script on the microSD card -# can change this to prevent automatic startup of the flight script. -# -set MODE autostart set USB autoconnect # @@ -62,12 +57,17 @@ else fi fi +# Look for an additional init script that allows changing the default +# behavior. Settings may be overriden in the following order: # -# Look for an init script on the microSD card. -# -# To prevent automatic startup in the current flight mode, -# the script should set MODE to some other value. -# +# board-specific file +# etc/rc on microSD card +# etc/rc.txt on microSD card +if [ -f /etc/init.d/rc.board ] +then + echo "[init] reading /etc/init.d/rc.board" + sh /etc/init.d/rc.board +fi if [ -f /fs/microsd/etc/rc ] then echo "[init] reading /fs/microsd/etc/rc"