base-files: sysupgrade: quote source image name
authorJohn Crispin <john@openwrt.org>
Mon, 14 Sep 2015 20:09:06 +0000 (20:09 +0000)
committerJohn Crispin <john@openwrt.org>
Mon, 14 Sep 2015 20:09:06 +0000 (20:09 +0000)
commitf445a6eb54d361e8b1a58037f31e24f23481eaf0
tree028d2d2b53cf46d30904ab29a8fa76f09ca08fcd
parent3550b16665ce8659a44d35c937e6e36607700d44
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>
SVN-Revision: 46919
package/base-files/files/lib/upgrade/common.sh