From: Yousong Zhou <yszhou4tech@gmail.com>
Date: Tue, 3 Nov 2020 03:26:21 +0000 (+0800)
Subject: base-files: upgrade: use stdin redirection to replace cat command
X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=bd21e4a93617a6609725509c67dc293242c80f97;p=openwrt%2Fstaging%2Fblogic.git

base-files: upgrade: use stdin redirection to replace cat command

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
---

diff --git a/package/base-files/files/lib/upgrade/common.sh b/package/base-files/files/lib/upgrade/common.sh
index 0f251993652f..5eb7b23a8307 100644
--- a/package/base-files/files/lib/upgrade/common.sh
+++ b/package/base-files/files/lib/upgrade/common.sh
@@ -103,7 +103,7 @@ get_image() { # <source> [ <command> ]
 		esac
 	fi
 
-	cat "$from" 2>/dev/null | $cmd
+	$cmd <"$from"
 }
 
 get_magic_word() {