commit: 3c53f403be48c44608938a85c0502fd1614eace9
Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 17 19:32:04 2014 +0000
Commit: Richard Farina <zerochaos <AT> gentoo <DOT> org>
CommitDate: Thu May 22 20:05:34 2014 +0000
URL:
http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commit;h=3c53f403
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 8b474aa..b4ce21d 100644
--- a/defaults/linuxrc
+++ b/defaults/linuxrc
@@ -976,17 +976,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}