base-files: sysupgrade: quote source image name
authorrmilecki <rmilecki@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 23 Sep 2015 11:55:18 +0000 (11:55 +0000)
committerrmilecki <rmilecki@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 23 Sep 2015 11:55:18 +0000 (11:55 +0000)
commit4f619e9bba153a53151e5ea3e7c4275c3f48afdc
tree80cc07a7a0fed7d955f86165a0a97721d216dd83
parentccbb0cbc95f7379f0a7ab719b21768e7ac270597
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

git-svn-id: svn://svn.openwrt.org/openwrt/branches/chaos_calmer@47028 3c298f89-4303-0410-b956-a3cf2f4a3e73
package/base-files/files/lib/upgrade/common.sh