commit:     854a835ede60717a9b4ac847b5e3e56877c35338
Author:     Fernando Reyes (likewhoa) <design <AT> missionaccomplish <DOT> com>
AuthorDate: Thu May 29 08:15:13 2014 +0000
Commit:     Richard Farina <zerochaos <AT> gentoo <DOT> org>
CommitDate: Mon Jun 23 23:11:14 2014 +0000
URL:        
http://sources.gentoo.org/gitweb/?p=proj/genkernel.git;a=commit;h=854a835e

Removing --bind on some directories to prevent ${NEW_ROOT} path
from existing in favor of --move.

Got rid of the no longer required subshell call for aufs ${NEW_ROOT}
overlay.

---
 defaults/initrd.scripts | 11 ++---------
 defaults/linuxrc        |  7 ++++---
 2 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts
index bf4124f..aded9ad 100644
--- a/defaults/initrd.scripts
+++ b/defaults/initrd.scripts
@@ -1363,10 +1363,9 @@ getdvhoff() {
 }
 
 setup_squashfs_aufs() {
-       (
        # Setup aufs directories and vars
-       local overlay=/mnt/overlay
-       local static=/mnt/livecd
+       overlay=/mnt/overlay
+       static=/mnt/livecd
 
        for i in "${overlay}" "${static}"; do
                [ ! -d "${i}" ] && mkdir -p "${i}"
@@ -1381,12 +1380,6 @@ setup_squashfs_aufs() {
        [ ! -d "${NEW_ROOT}${overlay}" ] && mkdir -p "${NEW_ROOT}${overlay}"
        [ ! -d "${NEW_ROOT}${static}" ] && mkdir -p "${NEW_ROOT}${static}"
        for i in "${overlay}" "${static}"; do mount --move "${i}" 
"${NEW_ROOT}${i}"; done
-
-       # have handy /mnt/cdrom (CDROOT_PATH) as well
-       local new_cdroot="${NEW_ROOT}${CDROOT_PATH}"
-       [ ! -d "${new_cdroot}" ] && mkdir -p "${new_cdroot}"
-       mount --bind "${CDROOT_PATH}" "${new_cdroot}"
-       )
 }
 
 setup_unionfs() {

diff --git a/defaults/linuxrc b/defaults/linuxrc
index d5b424c..0a91c58 100644
--- a/defaults/linuxrc
+++ b/defaults/linuxrc
@@ -995,7 +995,7 @@ then
        mkdir -p /${CHROOT}/.unions/memory
        mount -o move /memory /${CHROOT}/.unions/memory 
         test_success "Failed to move aufs /memory into the system root"
-        for i in mnt/gentoo mnt/livecd ${CDROOT_PATH}
+        for i in mnt/gentoo mnt/livecd /mnt/overlay ${CDROOT_PATH}
        do
                mkdir -p ${CHROOT}/$i
                chmod 755 ${CHROOT}/$i
@@ -1012,8 +1012,9 @@ then
        warn_msg "${str}are mounted in ram"
        warn_msg "consider saving important files elsewhere..."
        read -t 3 UNUSEDVAL
-       mount --bind ${NEW_ROOT}${CDROOT_PATH} ${CHROOT}${CDROOT_PATH}
-       mount --bind ${NEW_ROOT}/mnt/livecd ${CHROOT}/mnt/livecd
+        for i in ${CDROOT_PATH} ${overlay} ${static}; do
+                mount --move ${NEW_ROOT}${i} ${CHROOT}${i}
+        done
 fi
 
 good_msg "Booting (initramfs)"

Reply via email to