mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
apps/nxinit: Make init.rc file path configurable
The init.rc file path is now configurable to allow users to choose where to put the startup script. This is useful for devices that mount external media to a special directory like `/sd`. Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
This commit is contained in:
parent
6c08b45f3d
commit
28b3b2abd8
2 changed files with 7 additions and 1 deletions
|
|
@ -31,6 +31,12 @@ config SYSTEM_NXINIT_PROGNAME
|
|||
|
||||
comment "NXInit Run Control(RC)"
|
||||
|
||||
config SYSTEM_NXINIT_RC_FILE_PATH
|
||||
string "Path to RC file"
|
||||
default "/etc/init.d/init.rc"
|
||||
---help---
|
||||
Path to the init.rc file to use for NXInit's boot logic.
|
||||
|
||||
config SYSTEM_NXINIT_RC_LINE_MAX
|
||||
int "Max line length of RC file"
|
||||
default 128
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@ int main(int argc, FAR char *argv[])
|
|||
}
|
||||
}
|
||||
|
||||
r = init_parse_config_file(parser, "/etc/init.d/init.rc");
|
||||
r = init_parse_config_file(parser, CONFIG_SYSTEM_NXINIT_RC_FILE_PATH);
|
||||
if (r < 0)
|
||||
{
|
||||
goto out;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue