From: cshore Date: Mon, 31 Jan 2011 05:11:38 +0000 (+0000) Subject: [package]: block-extroot: Fixed hang when no modules in on either squashfs or jffs2... X-Git-Url: https://git.rohieb.name/openwrt.git/commitdiff_plain/c5e1e8ccd7b80fc5d9fa474b98ba0e39cc18dc65 [package]: block-extroot: Fixed hang when no modules in on either squashfs or jffs2 and suppressed extraneous not found error message when no modules on jffs2. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@25259 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- diff --git a/package/block-extroot/files/extmount.sh b/package/block-extroot/files/extmount.sh index f696324f7..1d5ebf26f 100644 --- a/package/block-extroot/files/extmount.sh +++ b/package/block-extroot/files/extmount.sh @@ -17,8 +17,8 @@ er_load_modules() { mkdir -p /tmp/extroot_modules/modules ln -sf /etc/modules.d/* /tmp/overlay/etc/modules.d/* /tmp/extroot_modules/modules.d ln -sf /lib/modules/*/* /tmp/overlay/lib/modules/*/* /tmp/extroot_modules/modules - local modules="$(grep -l '# May be required for rootfs' /tmp/extroot_modules/modules.d/*)" - cd /tmp/extroot_modules/modules && { + local modules="$(grep -l '# May be required for rootfs' /tmp/extroot_modules/modules.d/* 2>/dev/null)" + cd /tmp/extroot_modules/modules && [ -n "$modules" ] && { cat $modules | sed -e 's/^\([^#].*\)/insmod \.\/\1.ko/'| sh 2>&- || : } rm -rf /tmp/extroot_modules