diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2019-09-06 07:10:52 +0200 |
---|---|---|
committer | Rafał Miłecki <rafal@milecki.pl> | 2019-09-16 05:56:25 +0200 |
commit | 47a5f5c7e784dde805c530ee8a3870f093ab0a2e (patch) | |
tree | 8aa85be24a4d05b556ceb77ac8f0146455628f7f /package/base-files | |
parent | 0da990b773ca1f1e5bca648fedc05506c8a2da94 (diff) | |
download | upstream-47a5f5c7e784dde805c530ee8a3870f093ab0a2e.tar.gz upstream-47a5f5c7e784dde805c530ee8a3870f093ab0a2e.tar.bz2 upstream-47a5f5c7e784dde805c530ee8a3870f093ab0a2e.zip |
base-files: sysupgrade: pass "backup" ubus attribute
This explicitly tells procd what backup file should be used during
sysupgrade (if any). It's much more generic this way compared to the
magic /tmp/sysupgrade.tgz file that had to be created before a call.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit c5223b26a40ae61fc7750bf865464048af328ab1)
Diffstat (limited to 'package/base-files')
-rwxr-xr-x | package/base-files/files/sbin/sysupgrade | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/package/base-files/files/sbin/sysupgrade b/package/base-files/files/sbin/sysupgrade index f106c3c981..f18143bff4 100755 --- a/package/base-files/files/sbin/sysupgrade +++ b/package/base-files/files/sbin/sysupgrade @@ -362,10 +362,13 @@ if [ -n "$FAILSAFE" ]; then else force_attr="" [ $FORCE -eq 1 ] && force_attr="\"force\": true," + backup_attr="" + [ $SAVE_CONFIG -eq 1 ] && backup_attr="\"backup\": $(json_string $CONF_TAR)," ubus call system sysupgrade "{ \"prefix\": $(json_string "$RAM_ROOT"), \"path\": $(json_string "$IMAGE"), $force_attr + $backup_attr \"command\": $(json_string "$COMMAND"), \"options\": { \"save_config\": $SAVE_CONFIG, |