[openwrt/openwrt] base-files: export whole disk of fitblk backing partition
LEDE Commits
lede-commits at lists.infradead.org
Sun Feb 25 20:03:33 PST 2024
dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/0c18c5679ad3f68f5e02aea20da36aa2d1d759d5
commit 0c18c5679ad3f68f5e02aea20da36aa2d1d759d5
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Mon Feb 26 03:56:36 2024 +0000
base-files: export whole disk of fitblk backing partition
After commit ad62247800 ("base-files: improve lib/upgrade/common.sh")
behavior of export_bootdevice has been made consistent in such way that
always the whole disk device is exported (as that was the case already
when matching via UUID) rather than the partition device.
Do the same for the device holding the fitblk backing partition.
Fixes: 5992f976b3 ("base-files: recognize bootdevice on devices using fitblk")
Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
package/base-files/files/lib/upgrade/common.sh | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/package/base-files/files/lib/upgrade/common.sh b/package/base-files/files/lib/upgrade/common.sh
index 7e83379082..ef8d01e168 100644
--- a/package/base-files/files/lib/upgrade/common.sh
+++ b/package/base-files/files/lib/upgrade/common.sh
@@ -213,11 +213,8 @@ export_bootdevice() {
done
;;
/dev/*)
- if [ "$rootpart" = "/dev/fit0" ]; then
- uevent="/sys/class/block/$(fitblk_get_bootdev)/uevent"
- else
- uevent="/sys/class/block/${rootpart##*/}/../uevent"
- fi
+ [ "$rootpart" = "/dev/fit0" ] && rootpart="$(fitblk_get_bootdev)"
+ uevent="/sys/class/block/${rootpart##*/}/../uevent"
;;
0x[a-f0-9][a-f0-9][a-f0-9] | 0x[a-f0-9][a-f0-9][a-f0-9][a-f0-9] | \
[a-f0-9][a-f0-9][a-f0-9] | [a-f0-9][a-f0-9][a-f0-9][a-f0-9])
More information about the lede-commits
mailing list