system: support passing "options" to the "sysupgrade" ubus method
authorRafał Miłecki <rafal@milecki.pl>
Fri, 16 Aug 2019 14:14:27 +0000 (16:14 +0200)
committerRafał Miłecki <rafal@milecki.pl>
Thu, 22 Aug 2019 11:37:47 +0000 (13:37 +0200)
commit95580316bc2d37d9261691ea99dae518bde46836
tree45ad898ff3f1b2c17295ab3463dfa51c76b953b0
parent832369078d818d19ab64051fdc8da9e06c90ad88
system: support passing "options" to the "sysupgrade" ubus method

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 <rafal@milecki.pl>
initd/preinit.c
system.c
sysupgrade.c
sysupgrade.h