mirror of
https://github.com/immortalwrt/immortalwrt.git
synced 2025-08-11 06:11:53 +08:00
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
@ -384,8 +384,9 @@ json_load "$(/usr/libexec/validate_firmware_image "$IMAGE")" || {
|
||||
exit 1
|
||||
}
|
||||
json_get_var valid "valid"
|
||||
json_get_var forceable "forceable"
|
||||
[ "$valid" -eq 0 ] && {
|
||||
if [ $FORCE -eq 1 ]; then
|
||||
if [ $FORCE -eq 1 ] && [ "$forceable" -eq 1 ]; then
|
||||
echo "Image check failed but --force given - will update anyway!" >&2
|
||||
else
|
||||
echo "Image check failed." >&2
|
||||
|
@ -56,7 +56,17 @@ json_init
|
||||
# Call platform_check_image() here so it can add its test
|
||||
# results and still mark image properly.
|
||||
json_set_namespace $old_ns
|
||||
platform_check_image "$1" >&2 || notify_firmware_invalid
|
||||
platform_check_image "$1" >&2
|
||||
case "$?" in
|
||||
0)
|
||||
;;
|
||||
74)
|
||||
notify_firmware_broken
|
||||
;;
|
||||
*)
|
||||
notify_firmware_invalid
|
||||
;;
|
||||
esac
|
||||
json_set_namespace validate_firmware_image old_ns
|
||||
json_close_object
|
||||
json_add_boolean valid "$VALID"
|
||||
|
Reference in New Issue
Block a user