projects
/
openwrt
/
staging
/
lynxis.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1c1e254
)
base-files: exit if mtd write command fails during sysupgrade
author
Rafał Miłecki
<rafal@milecki.pl>
Mon, 11 Jun 2018 10:52:42 +0000
(12:52 +0200)
committer
John Crispin
<john@phrozen.org>
Mon, 18 Jun 2018 04:37:28 +0000
(06:37 +0200)
It avoids confusing situations like:
> Could not get image magic
> Image check failed.
> Upgrade completed
> Rebooting system...
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
package/base-files/files/lib/upgrade/common.sh
patch
|
blob
|
history
diff --git
a/package/base-files/files/lib/upgrade/common.sh
b/package/base-files/files/lib/upgrade/common.sh
index 38056fd346b1cf990c6db77f4e470ddf58304815..0cbd2ab3a69f9fd75b98e9b01d69913fffe5a746 100644
(file)
--- a/
package/base-files/files/lib/upgrade/common.sh
+++ b/
package/base-files/files/lib/upgrade/common.sh
@@
-222,6
+222,7
@@
default_do_upgrade() {
else
get_image "$1" "$2" | mtd write - "${PART_NAME:-image}"
fi
+ [ $? -ne 0 ] && exit 1
}
do_upgrade_stage2() {