summaryrefslogtreecommitdiff
path: root/package/block-extroot/files/extmount.sh
diff options
context:
space:
mode:
authorDaniel Dickinson <crazycshore@gmail.com>2011-03-13 09:24:24 +0000
committerDaniel Dickinson <crazycshore@gmail.com>2011-03-13 09:24:24 +0000
commit183b4d1a28eb811e51886f251a1b7f0d749aac41 (patch)
tree13f4a5768729da111106ca7371e80c021ac51c78 /package/block-extroot/files/extmount.sh
parent63c68ca40e83969aeefac18173a92aad6d3827ec (diff)
downloadmtk-20170518-183b4d1a28eb811e51886f251a1b7f0d749aac41.zip
mtk-20170518-183b4d1a28eb811e51886f251a1b7f0d749aac41.tar.gz
mtk-20170518-183b4d1a28eb811e51886f251a1b7f0d749aac41.tar.bz2
extroot: block-mount block-extroot: Added ability to do a whole disk extroot instead of only an overlay-based extroot.
SVN-Revision: 26109
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 1d5ebf2..44d662e 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
+ }
+}
+