block-extroot: Fixed hang when no modules in on either squashfs or jffs2 and suppress...
authorDaniel Dickinson <crazycshore@gmail.com>
Mon, 31 Jan 2011 05:11:38 +0000 (05:11 +0000)
committerDaniel Dickinson <crazycshore@gmail.com>
Mon, 31 Jan 2011 05:11:38 +0000 (05:11 +0000)
SVN-Revision: 25259

package/block-extroot/files/extmount.sh

index f696324f71dc3011f54664df7aa31cf4d1e83457..1d5ebf26fab74b294646fb69f6f93a779999d7f8 100644 (file)
@@ -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