[openwrt/openwrt] bcm4908: fix init on CFE devices

LEDE Commits lede-commits at lists.infradead.org
Mon Mar 7 02:14:40 PST 2022


rmilecki pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/c45b5abf6fce79ff3aab6d98cde3e8ff0ae1b1d6

commit c45b5abf6fce79ff3aab6d98cde3e8ff0ae1b1d6
Author: Rafał Miłecki <rafal at milecki.pl>
AuthorDate: Mon Mar 7 11:12:36 2022 +0100

    bcm4908: fix init on CFE devices
    
    exit in preinit script was stopping whole process
    
    Fixes: 93259e8ca261 ("bcm4908: support "rootfs_data" on U-Boot devices")
    Signed-off-by: Rafał Miłecki <rafal at milecki.pl>
---
 target/linux/bcm4908/base-files/lib/preinit/75_rootfs_prepare | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/bcm4908/base-files/lib/preinit/75_rootfs_prepare b/target/linux/bcm4908/base-files/lib/preinit/75_rootfs_prepare
index 07fa21814e..09c12cd31d 100644
--- a/target/linux/bcm4908/base-files/lib/preinit/75_rootfs_prepare
+++ b/target/linux/bcm4908/base-files/lib/preinit/75_rootfs_prepare
@@ -20,7 +20,7 @@ rootfs_create() {
 
 rootfs_prepare() {
 	# Do nothing on CFE devices
-	ubinfo /dev/ubi0 -N metadata1 > /dev/null 2>&1 || exit 0
+	ubinfo /dev/ubi0 -N metadata1 > /dev/null 2>&1 || return
 
 	# Find UBI volume device (e.g. ubi0_123)
 	local ubivol="$(grep rootfs_data /sys/devices/virtual/ubi/ubi*/ubi*/name | sed -n 's/.*\(ubi\d*_\d*\).*/\1/p')"




More information about the lede-commits mailing list