1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-10-18 21:48:23 +02:00

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.

SVN-Revision: 25259
This commit is contained in:
Daniel Dickinson 2011-01-31 05:11:38 +00:00
parent e00933b6d6
commit ef8a192e42

@ -17,8 +17,8 @@ er_load_modules() {
mkdir -p /tmp/extroot_modules/modules mkdir -p /tmp/extroot_modules/modules
ln -sf /etc/modules.d/* /tmp/overlay/etc/modules.d/* /tmp/extroot_modules/modules.d 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 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/*)" local modules="$(grep -l '# May be required for rootfs' /tmp/extroot_modules/modules.d/* 2>/dev/null)"
cd /tmp/extroot_modules/modules && { cd /tmp/extroot_modules/modules && [ -n "$modules" ] && {
cat $modules | sed -e 's/^\([^#].*\)/insmod \.\/\1.ko/'| sh 2>&- || : cat $modules | sed -e 's/^\([^#].*\)/insmod \.\/\1.ko/'| sh 2>&- || :
} }
rm -rf /tmp/extroot_modules rm -rf /tmp/extroot_modules