X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/848953efdfd9623fbc65a4cd11ab51ea46c3cdc0..f49117a33b85a922f01a2f5778b3a893aec9cd01:/package/block-extroot/files/extmount.sh?ds=sidebyside 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