summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2013-05-05 12:41:42 +0000
committerJohn Crispin <john@openwrt.org>2013-05-05 12:41:42 +0000
commitc7c243669c324b6b2592d397153a258c86efed5c (patch)
tree18e93e61c92f770c2dcec24cb88587a60cb0a07d /package
parent6b4f3344df04ed6dafca9a1987aff0838e385dfd (diff)
downloadmtk-20170518-c7c243669c324b6b2592d397153a258c86efed5c.zip
mtk-20170518-c7c243669c324b6b2592d397153a258c86efed5c.tar.gz
mtk-20170518-c7c243669c324b6b2592d397153a258c86efed5c.tar.bz2
sysupgrade: fixes broken pipe error during sysupgade
Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 36548
Diffstat (limited to 'package')
-rw-r--r--package/base-files/files/lib/upgrade/common.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/package/base-files/files/lib/upgrade/common.sh b/package/base-files/files/lib/upgrade/common.sh
index fbe54a5..6bb36db 100644
--- 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() {