projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6b4f334
)
sysupgrade: fixes broken pipe error during sysupgade
author
John Crispin
<
[email protected]
>
Sun, 5 May 2013 12:41:42 +0000
(12:41 +0000)
committer
John Crispin
<
[email protected]
>
Sun, 5 May 2013 12:41:42 +0000
(12:41 +0000)
Signed-off-by: John Crispin <
[email protected]
>
SVN-Revision: 36548
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 fbe54a5ee5f32bc225cd0204b78bc8231880adb3..6bb36db489302bbd592e1a261ee16e2c9a6e8f53 100644
(file)
--- a/
package/base-files/files/lib/upgrade/common.sh
+++ b/
package/base-files/files/lib/upgrade/common.sh
@@
-157,14
+157,14
@@
get_image() { # <source> [ <command> ]
*) cmd="cat";;
esac
if [ -z "$conc" ]; then
- local magic="$(eval $cmd $from | dd bs=2 count=1 2>/dev/null | hexdump -n 2 -e '1/1 "%02x"')"
+ local magic="$(eval $cmd $from
2>/dev/null
| dd bs=2 count=1 2>/dev/null | hexdump -n 2 -e '1/1 "%02x"')"
case "$magic" in
1f8b) conc="zcat";;
425a) conc="bzcat";;
esac
fi
- eval "$cmd $from ${conc:+| $conc}"
+ eval "$cmd $from
2>/dev/null
${conc:+| $conc}"
}
get_magic_word() {