summaryrefslogtreecommitdiffstats
path: root/package/block-extroot
diff options
context:
space:
mode:
Diffstat (limited to 'package/block-extroot')
-rw-r--r--package/block-extroot/files/50_determine_usb_root5
-rw-r--r--package/block-extroot/files/extmount.sh14
2 files changed, 10 insertions, 9 deletions
diff --git a/package/block-extroot/files/50_determine_usb_root b/package/block-extroot/files/50_determine_usb_root
index 98ec0016e..b899203e5 100644
--- a/package/block-extroot/files/50_determine_usb_root
+++ b/package/block-extroot/files/50_determine_usb_root
@@ -5,9 +5,8 @@
determine_external_root() {
- . /etc/functions.sh
- . /lib/functions/extmount.sh
- . /lib/functions/mount.sh
+ pi_include /lib/functions/extmount.sh
+ pi_include /lib/functions/mount.sh
local OLD_UCI_CONFIG_DIR="$UCI_CONFIG_DIR"
set_jffs_mp
diff --git a/package/block-extroot/files/extmount.sh b/package/block-extroot/files/extmount.sh
index dfd6eef07..f696324f7 100644
--- a/package/block-extroot/files/extmount.sh
+++ b/package/block-extroot/files/extmount.sh
@@ -13,12 +13,14 @@ set_jffs_mp() {
}
er_load_modules() {
- [ -d $ER_ROOT/etc/modules.d ] && {
- cd $ER_ROOT/etc/modules.d && {
- local modules="$(grep -l '# May be required for rootfs' *)"
- cat $modules | sed 's/^\([^#]\)/insmod \1/' | sh 2>&- || :
- }
+ mkdir -p /tmp/extroot_modules/modules.d
+ 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 && {
+ cat $modules | sed -e 's/^\([^#].*\)/insmod \.\/\1.ko/'| sh 2>&- || :
}
+ rm -rf /tmp/extroot_modules
}
-