aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files
diff options
context:
space:
mode:
authorRodrigo Balerdi <lanchon@gmail.com>2022-04-15 07:18:22 -0300
committerDaniel Golle <daniel@makrotopia.org>2022-04-19 16:28:25 +0100
commitf8351d65bb32f07a6362b136d66153073f601acb (patch)
tree6069ad3c4727c0cc1d42087b109fc821b9980fd4 /package/base-files/files
parentde4b65a793f8b7222d19f7507e7d3d93a0677597 (diff)
downloadupstream-f8351d65bb32f07a6362b136d66153073f601acb.tar.gz
upstream-f8351d65bb32f07a6362b136d66153073f601acb.tar.bz2
upstream-f8351d65bb32f07a6362b136d66153073f601acb.zip
base-files: clean up nand sysupgrade code
Fix some inconsistent quoting in nand sysupgrade code. Signed-off-by: Rodrigo Balerdi <lanchon@gmail.com>
Diffstat (limited to 'package/base-files/files')
-rw-r--r--package/base-files/files/lib/upgrade/nand.sh18
1 files changed, 9 insertions, 9 deletions
diff --git a/package/base-files/files/lib/upgrade/nand.sh b/package/base-files/files/lib/upgrade/nand.sh
index c7ec59cb22..f941718446 100644
--- a/package/base-files/files/lib/upgrade/nand.sh
+++ b/package/base-files/files/lib/upgrade/nand.sh
@@ -98,10 +98,10 @@ identify_tar() {
nand_restore_config() {
sync
- local ubidev=$( nand_find_ubi $CI_UBIPART )
+ local ubidev=$( nand_find_ubi "$CI_UBIPART" )
local ubivol="$( nand_find_volume $ubidev rootfs_data )"
[ ! "$ubivol" ] &&
- ubivol="$( nand_find_volume $ubidev $CI_ROOTPART )"
+ ubivol="$( nand_find_volume $ubidev "$CI_ROOTPART" )"
mkdir /tmp/new_root
if ! mount -t ubifs /dev/$ubivol /tmp/new_root; then
echo "mounting ubifs $ubivol failed"
@@ -167,8 +167,8 @@ nand_upgrade_prepare_ubi() {
fi
fi
- local kern_ubivol="$( nand_find_volume $ubidev $CI_KERNPART )"
- local root_ubivol="$( nand_find_volume $ubidev $CI_ROOTPART )"
+ local kern_ubivol="$( nand_find_volume $ubidev "$CI_KERNPART" )"
+ local root_ubivol="$( nand_find_volume $ubidev "$CI_ROOTPART" )"
local data_ubivol="$( nand_find_volume $ubidev rootfs_data )"
[ "$root_ubivol" = "$kern_ubivol" ] && root_ubivol=
@@ -178,13 +178,13 @@ nand_upgrade_prepare_ubi() {
[ "$data_ubivol" ] && { nand_remove_ubiblock $data_ubivol || return 1; }
# kill volumes
- [ "$kern_ubivol" ] && ubirmvol /dev/$ubidev -N $CI_KERNPART || :
- [ "$root_ubivol" ] && ubirmvol /dev/$ubidev -N $CI_ROOTPART || :
+ [ "$kern_ubivol" ] && ubirmvol /dev/$ubidev -N "$CI_KERNPART" || :
+ [ "$root_ubivol" ] && ubirmvol /dev/$ubidev -N "$CI_ROOTPART" || :
[ "$data_ubivol" ] && ubirmvol /dev/$ubidev -N rootfs_data || :
# create kernel vol
if [ -n "$kernel_length" ]; then
- if ! ubimkvol /dev/$ubidev -N $CI_KERNPART -s $kernel_length; then
+ if ! ubimkvol /dev/$ubidev -N "$CI_KERNPART" -s $kernel_length; then
echo "cannot create kernel volume"
return 1;
fi
@@ -198,7 +198,7 @@ nand_upgrade_prepare_ubi() {
else
rootfs_size_param="-s $rootfs_length"
fi
- if ! ubimkvol /dev/$ubidev -N $CI_ROOTPART $rootfs_size_param; then
+ if ! ubimkvol /dev/$ubidev -N "$CI_ROOTPART" $rootfs_size_param; then
echo "cannot create rootfs volume"
return 1;
fi
@@ -258,7 +258,7 @@ nand_upgrade_ubifs() {
nand_upgrade_prepare_ubi "$rootfs_length" "ubifs" "" ""
local ubidev="$( nand_find_ubi "$CI_UBIPART" )"
- local root_ubivol="$(nand_find_volume $ubidev $CI_ROOTPART)"
+ local root_ubivol="$(nand_find_volume $ubidev "$CI_ROOTPART")"
ubiupdatevol /dev/$root_ubivol -s $rootfs_length $1
nand_do_upgrade_success