diff options
author | Brian Norris <computersforpeace@gmail.com> | 2022-12-20 22:21:46 -0800 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2023-02-03 14:09:46 +0100 |
commit | 3cd882744d8ee347e7b55f113a95f93cfe7175cd (patch) | |
tree | 08ebe0c66b069b85c789cd4ede16da9ea9a67101 /package | |
parent | d9a1eee764aa8a800e2094d614bbe8e1b248b8c3 (diff) | |
download | upstream-3cd882744d8ee347e7b55f113a95f93cfe7175cd.tar.gz upstream-3cd882744d8ee347e7b55f113a95f93cfe7175cd.tar.bz2 upstream-3cd882744d8ee347e7b55f113a95f93cfe7175cd.zip |
base-files: upgrade: Fix export_partdevice() quoting
$BOOTDEV_MAJOR may be empty for many of the uevents parsed in this
function. This condition thus tends to fail benignly (we just skip to
the next device), but it can really clutter the stage2 sysupgrade
stderr, since it looks like the "=" operand doesn't have an appropriate
left-hand argument.
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'package')
-rw-r--r-- | package/base-files/files/lib/upgrade/common.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/package/base-files/files/lib/upgrade/common.sh b/package/base-files/files/lib/upgrade/common.sh index 53b8865a57..af1182cb16 100644 --- a/package/base-files/files/lib/upgrade/common.sh +++ b/package/base-files/files/lib/upgrade/common.sh @@ -232,7 +232,7 @@ export_partdevice() { while read line; do export -n "$line" done < "$uevent" - if [ $BOOTDEV_MAJOR = $MAJOR -a $(($BOOTDEV_MINOR + $offset)) = $MINOR -a -b "/dev/$DEVNAME" ]; then + if [ "$BOOTDEV_MAJOR" = "$MAJOR" -a $(($BOOTDEV_MINOR + $offset)) = "$MINOR" -a -b "/dev/$DEVNAME" ]; then export "$var=$DEVNAME" return 0 fi |