aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2019-09-03 14:44:40 +0200
committerJo-Philipp Wich <jo@mein.io>2019-09-04 13:47:17 +0200
commitd7af17532193ad3650f489c2b38d94630c79f936 (patch)
tree46be635795603bfadc54149f413ba8b317cd1000 /package/base-files
parentaa239ceaed9e2f04d13c23924acea56b6edeae9f (diff)
downloadupstream-d7af17532193ad3650f489c2b38d94630c79f936.tar.gz
upstream-d7af17532193ad3650f489c2b38d94630c79f936.tar.bz2
upstream-d7af17532193ad3650f489c2b38d94630c79f936.zip
base-files: pass "force" parameter to the "sysupgrade" call
This makes sysupgrade work with the most recent procd that validates firmware before proceeding. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit b71962da16c2e2b93d633d7bde1436b3da2bf740)
Diffstat (limited to 'package/base-files')
-rwxr-xr-xpackage/base-files/files/sbin/sysupgrade3
1 files changed, 3 insertions, 0 deletions
diff --git a/package/base-files/files/sbin/sysupgrade b/package/base-files/files/sbin/sysupgrade
index 42f0f6bd22..f106c3c981 100755
--- a/package/base-files/files/sbin/sysupgrade
+++ b/package/base-files/files/sbin/sysupgrade
@@ -360,9 +360,12 @@ if [ -n "$FAILSAFE" ]; then
printf '%s\x00%s\x00%s' "$RAM_ROOT" "$IMAGE" "$COMMAND" >/tmp/sysupgrade
lock -u /tmp/.failsafe
else
+ force_attr=""
+ [ $FORCE -eq 1 ] && force_attr="\"force\": true,"
ubus call system sysupgrade "{
\"prefix\": $(json_string "$RAM_ROOT"),
\"path\": $(json_string "$IMAGE"),
+ $force_attr
\"command\": $(json_string "$COMMAND"),
\"options\": {
\"save_config\": $SAVE_CONFIG,