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)
master
Rafał Miłecki 5 years ago committed by Jo-Philipp Wich
parent aa239ceaed
commit d7af175321
  1. 3
      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,

Loading…
Cancel
Save