projects
/
openwrt
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
extroot: block-mount block-extroot: Added ability to do a whole disk extroot instead...
[openwrt/openwrt.git]
/
package
/
block-extroot
/
files
/
extmount.sh
diff --git
a/package/block-extroot/files/extmount.sh
b/package/block-extroot/files/extmount.sh
index 1d5ebf26fab74b294646fb69f6f93a779999d7f8..44d662e63affd1f5156108a770af43d0d1bffe43 100644
(file)
--- 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
+ }
+}
+