projects
/
oweals
/
procd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
jail: replace /etc/resolv.conf with symlink in extroot+overlay
[oweals/procd.git]
/
sysupgrade.c
diff --git
a/sysupgrade.c
b/sysupgrade.c
index ce30798e5478877ae82ea0a4b225e31c2ef40134..fc588b0248353137d4b81fce130d2d35d8dfa710 100644
(file)
--- a/
sysupgrade.c
+++ b/
sysupgrade.c
@@
-25,7
+25,8
@@
#include <libubox/blobmsg.h>
#include <libubox/blobmsg.h>
-void sysupgrade_exec_upgraded(const char *prefix, char *path, char *command,
+void sysupgrade_exec_upgraded(const char *prefix, char *path,
+ const char *backup, char *command,
struct blob_attr *options)
{
char *wdt_fd = watchdog_fd();
struct blob_attr *options)
{
char *wdt_fd = watchdog_fd();
@@
-48,6
+49,9
@@
void sysupgrade_exec_upgraded(const char *prefix, char *path, char *command,
setenv("WDTFD", wdt_fd, 1);
}
setenv("WDTFD", wdt_fd, 1);
}
+ if (backup)
+ setenv("UPGRADE_BACKUP", backup, 1);
+
blobmsg_for_each_attr(option, options, rem) {
const char *prefix = "UPGRADE_OPT_";
char value[11];
blobmsg_for_each_attr(option, options, rem) {
const char *prefix = "UPGRADE_OPT_";
char value[11];