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
This commit is contained in:
parent
8db111e0a0
commit
7d8bed8a55
@ -13,11 +13,6 @@
|
|||||||
# add them to the per-configuration scripts instead.
|
# 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
|
set USB autoconnect
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -62,12 +57,17 @@ else
|
|||||||
fi
|
fi
|
||||||
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.
|
# board-specific file
|
||||||
#
|
# etc/rc on microSD card
|
||||||
# To prevent automatic startup in the current flight mode,
|
# etc/rc.txt on microSD card
|
||||||
# the script should set MODE to some other value.
|
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 ]
|
if [ -f /fs/microsd/etc/rc ]
|
||||||
then
|
then
|
||||||
echo "[init] reading /fs/microsd/etc/rc"
|
echo "[init] reading /fs/microsd/etc/rc"
|
||||||
|
Loading…
Reference in New Issue
Block a user