summaryrefslogtreecommitdiffstats
path: root/package/block-extroot/files/extmount.sh
diff options
context:
space:
mode:
Diffstat (limited to 'package/block-extroot/files/extmount.sh')
-rw-r--r--package/block-extroot/files/extmount.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/package/block-extroot/files/extmount.sh b/package/block-extroot/files/extmount.sh
index 1d5ebf26fa..44d662e63a 100644
--- a/package/block-extroot/files/extmount.sh
+++ b/package/block-extroot/files/extmount.sh
@@ -24,3 +24,13 @@ er_load_modules() {
rm -rf /tmp/extroot_modules
}
+pivot_rom() { # <new_root> <old_root>
+ mount -o move /proc $1/proc && \
+ pivot_root $1 $1$2 && {
+ mount -o move $2/dev /dev
+ mount -o move $2/tmp /tmp
+ mount -o move $2/sys /sys 2>&-
+ return 0
+ }
+}
+