From 95580316bc2d37d9261691ea99dae518bde46836 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Fri, 16 Aug 2019 16:14:27 +0200 Subject: system: support passing "options" to the "sysupgrade" ubus method MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Object passed as "options" gets translated into environment variables UPGRADE_OPT_*. E.g. "options": { "foo": 5 } will result in setting UPGRADE_OPT_FOO=5. This allows stage2 sysupgrade to get options explicitly. So far it was guessing what to do by checking for existence of some files (e.g. sysupgrade.tgz). Signed-off-by: Rafał Miłecki --- initd/preinit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'initd') diff --git a/initd/preinit.c b/initd/preinit.c index fbb36df..2b4df4b 100644 --- a/initd/preinit.c +++ b/initd/preinit.c @@ -75,7 +75,7 @@ check_sysupgrade(void) fclose(sysupgrade); - sysupgrade_exec_upgraded(prefix, path, command); + sysupgrade_exec_upgraded(prefix, path, command, NULL); while (true) sleep(1); -- cgit v1.2.1