commit:     d0f0ed18531a40132a30a801b98a49ba0ee56335
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 17 19:32:04 2014 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Mon Mar 17 19:32:04 2014 +0000
URL:        
http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commit;h=d0f0ed18

Refactor tmpfs creation to aufs env.

Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>

---
 defaults/linuxrc | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/defaults/linuxrc b/defaults/linuxrc
index 7758389..71a81dc 100644
--- a/defaults/linuxrc
+++ b/defaults/linuxrc
@@ -975,17 +975,21 @@ if [ "${USE_AUFS_NORMAL}" -eq '1' ]
 then
        mkdir -p /${CHROOT}/.unions/memory 2>/dev/null
        mount -o move /memory /${CHROOT}/.unions/memory || echo '*: Failed to 
move aufs /memory into the system root!'
-       for i in tmp var/tmp mnt/gentoo mnt/livecd
+       for i in mnt/gentoo mnt/livecd
        do
                mkdir -p ${CHROOT}/$i
                chmod 755 ${CHROOT}/$i
        done
        # This will prevent from putting junk on the CHANGESDEV
-       mkdir -p ${CHROOT}/usr/portage/distfiles
-       mount -t tmpfs tmpfs ${CHROOT}/var/tmp
-       mount -t tmpfs tmpfs ${CHROOT}/tmp
-       mount -t tmpfs tmpfs ${CHROOT}/usr/portage/distfiles
-       warn_msg "/tmp /var/tmp /usr/portage/distfiles are mounted in ram"
+       str=""
+       for i in tmp var/tmp usr/portage/distfiles
+       do
+               mkdir -p ${CHROOT}/$i
+               chmod 755 ${CHROOT}/$i
+               mount -t tmpfs tmpfs ${CHROOT}/$i
+               str="${str} ${i}"
+       done
+       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}

Reply via email to