#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();
setenv("WDTFD", wdt_fd, 1);
}
- setenv("UPGRADE_BACKUP", "/tmp/sysupgrade.tgz", 1);
+ if (backup)
+ setenv("UPGRADE_BACKUP", backup, 1);
blobmsg_for_each_attr(option, options, rem) {
const char *prefix = "UPGRADE_OPT_";