Gentoo Archives: gentoo-commits

From: Richard Farina <zerochaos@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/genkernel:aufs commit in: defaults/
Date: Thu, 22 May 2014 20:28:53
Message-Id: 1400789134.3c53f403be48c44608938a85c0502fd1614eace9.zerochaos@gentoo
1 commit: 3c53f403be48c44608938a85c0502fd1614eace9
2 Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
3 AuthorDate: Mon Mar 17 19:32:04 2014 +0000
4 Commit: Richard Farina <zerochaos <AT> gentoo <DOT> org>
5 CommitDate: Thu May 22 20:05:34 2014 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commit;h=3c53f403
7
8 Refactor tmpfs creation to aufs env.
9
10 Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
11
12 ---
13 defaults/linuxrc | 16 ++++++++++------
14 1 file changed, 10 insertions(+), 6 deletions(-)
15
16 diff --git a/defaults/linuxrc b/defaults/linuxrc
17 index 8b474aa..b4ce21d 100644
18 --- a/defaults/linuxrc
19 +++ b/defaults/linuxrc
20 @@ -976,17 +976,21 @@ if [ "${USE_AUFS_NORMAL}" -eq '1' ]
21 then
22 mkdir -p /${CHROOT}/.unions/memory 2>/dev/null
23 mount -o move /memory /${CHROOT}/.unions/memory || echo '*: Failed to move aufs /memory into the system root!'
24 - for i in tmp var/tmp mnt/gentoo mnt/livecd
25 + for i in mnt/gentoo mnt/livecd
26 do
27 mkdir -p ${CHROOT}/$i
28 chmod 755 ${CHROOT}/$i
29 done
30 # This will prevent from putting junk on the CHANGESDEV
31 - mkdir -p ${CHROOT}/usr/portage/distfiles
32 - mount -t tmpfs tmpfs ${CHROOT}/var/tmp
33 - mount -t tmpfs tmpfs ${CHROOT}/tmp
34 - mount -t tmpfs tmpfs ${CHROOT}/usr/portage/distfiles
35 - warn_msg "/tmp /var/tmp /usr/portage/distfiles are mounted in ram"
36 + str=""
37 + for i in tmp var/tmp usr/portage/distfiles
38 + do
39 + mkdir -p ${CHROOT}/$i
40 + chmod 755 ${CHROOT}/$i
41 + mount -t tmpfs tmpfs ${CHROOT}/$i
42 + str="${str} ${i}"
43 + done
44 + warn_msg "${str}are mounted in ram"
45 warn_msg "consider saving important files elsewhere..."
46 read -t 3 UNUSEDVAL
47 mount --bind ${NEW_ROOT}${CDROOT_PATH} ${CHROOT}${CDROOT_PATH}