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)
commite34fef723d77bf5c792bbdefa4b8ac7a173fc42a
tree80cc07a7a0fed7d955f86165a0a97721d216dd83
parentaa779561b6816f95f0ac61a4dda7875e1cf3388c
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