base-files: upgrade: use stdin redirection to replace cat command
[openwrt/staging/noltari.git] / package / base-files / files / lib / upgrade / common.sh
index 0f251993652f1be254847dcfc8573d28e47acde4..5eb7b23a830791136b7899145b16a6cd2be49cd5 100644 (file)
@@ -103,7 +103,7 @@ get_image() { # <source> [ <command> ]
                esac
        fi
 
-       cat "$from" 2>/dev/null | $cmd
+       $cmd <"$from"
 }
 
 get_magic_word() {