base-files: sysupgrade: quote source image name
authorRafał Miłecki <zajec5@gmail.com>
Wed, 23 Sep 2015 11:55:18 +0000 (11:55 +0000)
committerRafał Miłecki <zajec5@gmail.com>
Wed, 23 Sep 2015 11:55:18 +0000 (11:55 +0000)
commita49dfab5b09e7f951f9d3941296acc7c5791a2e0
tree54ba1dbb58a6e7a20b4f71f8c928ac878772f380
parent6c89a9f63112107271510a3a1cc3e5d609ee47dd
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>
Backport of r46919

SVN-Revision: 47028
package/base-files/files/lib/upgrade/common.sh