aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--package/block-mount/files/50_determine_usb_root8
1 files changed, 8 insertions, 0 deletions
diff --git a/package/block-mount/files/50_determine_usb_root b/package/block-mount/files/50_determine_usb_root
index 8c5841e32b..d398062664 100644
--- a/package/block-mount/files/50_determine_usb_root
+++ b/package/block-mount/files/50_determine_usb_root
@@ -9,6 +9,8 @@ determine_external_root() {
pi_include /lib/functions/mount.sh
local OLD_UCI_CONFIG_DIR="$UCI_CONFIG_DIR"
+ local OLD_PATH="$PATH"
+ local OLD_LD_LIBRARY_PATH="$LD_LIBRARY_PATH"
set_jffs_mp
determine_root_device
@@ -19,6 +21,9 @@ determine_external_root() {
UCI_CONFIG_DIR="/tmp/overlay/etc/config"
ER_IS_SQUASHFS=true
ER_OVERLAY_PREFIX="/tmp/overlay"
+ PATH=$ER_OVERLAY_PREFIX/sbin:$PATH
+ LD_LIBRARY_PATH=$ER_OVERLAY_PREFIX/usr/lib:$LD_LIBRARY_PATH
+ export PATH LD_LIBRARY_PATH
fi
# For squashfs on firstboot root_device will be tmpfs for the ramoverlay,
@@ -51,6 +56,9 @@ determine_external_root() {
}
}
UCI_CONFIG_DIR="$OLD_UCI_CONFIG_DIR"
+ PATH="$OLD_PATH"
+ LD_LIBRARY_PATH="$OLD_LD_LIBRARY_PATH"
+ export PATH LD_LIBRARY_PATH
}
boot_hook_add preinit_mount_root determine_external_root