Fix #250: support finit.cond=foo for cmdline <boot/foo> conditions

As a real life example, this can be useful for a mfgtest mode for the
device, wherein the bootloader can be set to finit.cond=test_mode or
finit.cond=user_mode and then specific services can start up in test
mode which wouldn't normally start.

Or even custom firmware update mode such as finit.cond=fw_update_mode
which performs some specific firmware update steps and doesn't launch
normal processes.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2022-06-26 21:55:50 +02:00
1 parent 0d57a507f3
commit caa398816d
5 files changed
+93 -8

No files matched your search

+5
View File
@@ -113,6 +113,11 @@ static void parse_finit_opts(char *opt)
return;
}
if (string_compare(opt, "cond")) {
cond_boot_parse(arg);
return;
}
if (string_compare(opt, "status_style")) {
if (!arg) {
_e("status_style option requires an argument, skipping.");