mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-11 15:33:03 +00:00
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>
This commit is contained in:
parent
e68c1cebd1
commit
b71962da16
@ -360,9 +360,12 @@ if [ -n "$FAILSAFE" ]; then
|
|||||||
printf '%s\x00%s\x00%s' "$RAM_ROOT" "$IMAGE" "$COMMAND" >/tmp/sysupgrade
|
printf '%s\x00%s\x00%s' "$RAM_ROOT" "$IMAGE" "$COMMAND" >/tmp/sysupgrade
|
||||||
lock -u /tmp/.failsafe
|
lock -u /tmp/.failsafe
|
||||||
else
|
else
|
||||||
|
force_attr=""
|
||||||
|
[ $FORCE -eq 1 ] && force_attr="\"force\": true,"
|
||||||
ubus call system sysupgrade "{
|
ubus call system sysupgrade "{
|
||||||
\"prefix\": $(json_string "$RAM_ROOT"),
|
\"prefix\": $(json_string "$RAM_ROOT"),
|
||||||
\"path\": $(json_string "$IMAGE"),
|
\"path\": $(json_string "$IMAGE"),
|
||||||
|
$force_attr
|
||||||
\"command\": $(json_string "$COMMAND"),
|
\"command\": $(json_string "$COMMAND"),
|
||||||
\"options\": {
|
\"options\": {
|
||||||
\"save_config\": $SAVE_CONFIG,
|
\"save_config\": $SAVE_CONFIG,
|
||||||
|
Loading…
Reference in New Issue
Block a user