diff options
author | Felix Fietkau <nbd@openwrt.org> | 2014-04-07 09:50:07 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2014-04-07 09:50:07 +0000 |
commit | 4a736626c1e5e37e34f775298c4df82376e87ff8 (patch) | |
tree | 93b2c7f795501e733e064a31e018fd40a137aaab /package | |
parent | 83276fb4e2738d50b5cb576da47e56f3255d85c3 (diff) | |
download | upstream-4a736626c1e5e37e34f775298c4df82376e87ff8.tar.gz upstream-4a736626c1e5e37e34f775298c4df82376e87ff8.tar.bz2 upstream-4a736626c1e5e37e34f775298c4df82376e87ff8.zip |
/lib/functions.sh: remove support for non-overlayfs overlay fopivot types
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40401 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rwxr-xr-x | package/base-files/files/lib/functions.sh | 46 |
1 files changed, 2 insertions, 44 deletions
diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh index e7ca02a655..31df7f7764 100755 --- a/package/base-files/files/lib/functions.sh +++ b/package/base-files/files/lib/functions.sh @@ -540,33 +540,6 @@ jffs2_ready() { [ "$magic" != "deadc0de" ] } -dupe() { # <new_root> <old_root> - cd $1 - echo -n "creating directories... " - { - cd $2 - find . -xdev -type d - echo "./dev ./overlay ./mnt ./proc ./tmp" - # xdev skips mounted directories - cd $1 - } | xargs mkdir -p - echo "done" - - echo -n "setting up symlinks... " - for file in $(cd $2; find . -xdev -type f;); do - case "$file" in - ./rom/note) ;; #nothing - ./etc/config*|\ - ./usr/lib/opkg/info/*) cp -af $2/$file $file;; - *) ln -sf /rom/${file#./*} $file;; - esac - done - for file in $(cd $2; find . -xdev -type l;); do - cp -af $2/${file#./*} $file - done - echo "done" -} - pivot() { # <new_root> <old_root> /bin/mount -o noatime,move /proc $1/proc && \ pivot_root $1 $1$2 && { @@ -579,23 +552,8 @@ pivot() { # <new_root> <old_root> } fopivot() { # <rw_root> <ro_root> <dupe?> - root=$1 - { - if grep -q overlay /proc/filesystems; then - /bin/mount -o noatime,lowerdir=/,upperdir=$1 -t overlayfs "overlayfs:$1" /mnt && root=/mnt - elif grep -q mini_fo /proc/filesystems; then - /bin/mount -t mini_fo -o noatime,base=/,sto=$1 "mini_fo:$1" /mnt 2>&- && root=/mnt - else - /bin/mount --bind -o noatime / /mnt - /bin/mount --bind -o noatime,union "$1" /mnt && root=/mnt - fi - } || { - [ "$3" = "1" ] && { - /bin/mount | grep "on $1 type" 2>&- 1>&- || /bin/mount -o noatime,bind $1 $1 - dupe $1 $rom - } - } - pivot $root $2 + /bin/mount -o noatime,lowerdir=/,upperdir=$1 -t overlayfs "overlayfs:$1" /mnt + pivot /mnt $2 } ramoverlay() { |