diff options
author | cshore <cshore@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2011-03-13 09:24:24 +0000 |
---|---|---|
committer | cshore <cshore@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2011-03-13 09:24:24 +0000 |
commit | d4627d82f4310994d6b14123a99a2c195de6320f (patch) | |
tree | 2ecde042e1f9ca33ce04a4ffcdd521a9c4fb3bc1 /package/block-extroot/files/60_pivot_usb_root | |
parent | d011a32a8b64a07e70bff72d767bebf464cf4487 (diff) |
[package] extroot: block-mount block-extroot: Added ability to do a whole disk extroot instead of only an overlay-based extroot.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@26109 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/block-extroot/files/60_pivot_usb_root')
-rw-r--r-- | package/block-extroot/files/60_pivot_usb_root | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/package/block-extroot/files/60_pivot_usb_root b/package/block-extroot/files/60_pivot_usb_root index 1c9be97ca..b610a4ade 100644 --- a/package/block-extroot/files/60_pivot_usb_root +++ b/package/block-extroot/files/60_pivot_usb_root @@ -9,10 +9,17 @@ external_root_pivot() { check_skip || [ "$pi_extroot_mount_success" != "true" ] || { echo "switching to external rootfs" - if [ "$ER_IS_SQUASHFS" = "true" ]; then - umount /tmp/overlay + if [ "$ER_OVERLAY_ROM" = "/overlay" ]; then + if [ "$ER_IS_SQUASHFS" = "true" ]; then + umount /tmp/overlay + fi + mount -o remount,ro / && fopivot /overlay /rom && pi_mount_skip_next=true + elif [ "$ER_OVERLAY_ROM" = "/rom" ]; then + if [ "$ER_IS_SQUASHFS" = "true" ]; then + umount /tmp/overlay + fi + mount -o remount,ro / && pivot_rom /rom /rom && pi_mount_skip_next=true fi - mount -o remount,ro / && fopivot /overlay /rom && pi_mount_skip_next=true } } |