From 62f42260d7a99c2dc691191f3af3ad2267b7a8ea Mon Sep 17 00:00:00 2001 From: John Crispin Date: Sun, 5 May 2013 12:41:42 +0000 Subject: [PATCH] sysupgrade: fixes broken pipe error during sysupgade Signed-off-by: John Crispin SVN-Revision: 36548 --- package/base-files/files/lib/upgrade/common.sh | 4 ++-- 1 file 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 fbe54a5ee5..6bb36db489 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() { # [ ] *) 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() { -- 2.30.2