base-files: sysupgrade: quote source image name
authorblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Mon, 14 Sep 2015 20:09:06 +0000 (20:09 +0000)
committerblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Mon, 14 Sep 2015 20:09:06 +0000 (20:09 +0000)
commit4350340373f8cc4c999899a50cf6cba8b6736569
tree028d2d2b53cf46d30904ab29a8fa76f09ca08fcd
parent59171b1d6f2b4d118f6a53dbba86d0e3a0279306
base-files: sysupgrade: quote source image name

get_image() eval a filename without quoting it, resulting in errors with
filenames containing characters that need to be escaped.
    $ sysupgrade -T -f ./cfg\(12\).tar.gz img.bin; echo $?
    Image check 'platform_check_image' failed.
    Invalid config file. Please use only .tar.gz files
    1
    $ mv cfg\(12\).tar.gz cfg_12.tar.gz
    $ mv img\(1\).bin img.bin
    sysupgrade -T -f ./cfg_12.tar.gz img.bin; echo $?
    0

Enclose the content of $from in double quotes.

Signed-off-by: Adrien Schildknecht <adrien+dev@schischi.me>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46919 3c298f89-4303-0410-b956-a3cf2f4a3e73
package/base-files/files/lib/upgrade/common.sh