X-Git-Url: http://git.ozo.com/?a=blobdiff_plain;f=package%2Fbase-files%2Ffiles%2Flib%2Fupgrade%2Fcommon.sh;h=761b4c17957e2cf63b88025520b6fba59c890255;hb=4ef319fad23b566a226dc3edcf1f3e50c43032e2;hp=189ef69e954a1948465cf3842ca6f775208bfe2d;hpb=2efdc7c896fcd846e9a4732f93dc36e095d37a07;p=lede-git%2F.git diff --git a/package/base-files/files/lib/upgrade/common.sh b/package/base-files/files/lib/upgrade/common.sh index 189ef69e95..761b4c1795 100644 --- a/package/base-files/files/lib/upgrade/common.sh +++ b/package/base-files/files/lib/upgrade/common.sh @@ -184,14 +184,14 @@ get_image() { # [ ] *) cmd="cat";; esac if [ -z "$conc" ]; then - local magic="$(eval $cmd $from 2>/dev/null | 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 2>/dev/null ${conc:+| $conc}" + eval "$cmd \"$from\" 2>/dev/null ${conc:+| $conc}" } get_magic_word() {