diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2019-09-05 09:20:13 +0200 |
---|---|---|
committer | Rafał Miłecki <rafal@milecki.pl> | 2019-09-05 23:12:50 +0200 |
commit | 0f3c1366bb927e483abfae23dee0d15e26f87064 (patch) | |
tree | 0cb0204e5816ab2bfa612da0e802c07db2f4f84c | |
parent | 0bcbbbf1abf76bf3aa8af5657308cac61f7de602 (diff) | |
download | procd-0f3c1366bb927e483abfae23dee0d15e26f87064.tar.gz |
sysupgrade: set UPGRADE_BACKUP env variable
It points to the backup file to use duing sysupgrace process. Right now
it's hardcoded to the /tmp/sysupgrade.tgz. Once all cleanups are in
place "sysupgrade" ubus method should be extended to allow passing any
custom path.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
-rw-r--r-- | sysupgrade.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sysupgrade.c b/sysupgrade.c index ce30798..19fb054 100644 --- a/sysupgrade.c +++ b/sysupgrade.c @@ -48,6 +48,8 @@ void sysupgrade_exec_upgraded(const char *prefix, char *path, char *command, setenv("WDTFD", wdt_fd, 1); } + setenv("UPGRADE_BACKUP", "/tmp/sysupgrade.tgz", 1); + blobmsg_for_each_attr(option, options, rem) { const char *prefix = "UPGRADE_OPT_"; char value[11]; |