commit: 1409c54c01d3044be5d79697b2de14037cc0496a
Author: Fernando Reyes (likewhoa) <design <AT> missionaccomplish <DOT> com>
AuthorDate: Wed Jun 4 23:04:30 2014 +0000
Commit: Richard Farina <zerochaos <AT> gentoo <DOT> org>
CommitDate: Mon Jun 23 23:11:15 2014 +0000
URL:
http://sources.gentoo.org/gitweb/?p=proj/genkernel.git;a=commit;h=1409c54c
This introduces changes to former commits d8e2d4d & 720a60f in
which there are fstab changes and tmpfs mounts which are combined
into one /etc/fstab instead.
---
defaults/linuxrc | 32 +++++++++++++-------------------
1 file changed, 13 insertions(+), 19 deletions(-)
diff --git a/defaults/linuxrc b/defaults/linuxrc
index a6c4806..8b3ff87 100644
--- a/defaults/linuxrc
+++ b/defaults/linuxrc
@@ -794,9 +794,19 @@ then
# Function to handle the RC_NO_UMOUNTS variable in
${CHROOT}/etc/rc.conf
conf_rc_no_umounts
- # Fstab change for aufs
- test ! $(grep -o ^aufs "${CHROOT}"/etc/fstab) &&
- echo "aufs / aufs defaults 0 0" > "${CHROOT}"/etc/fstab
+ # Fstab changes for aufs
+ if ! grep -q '^aufs' "${CHROOT}"/etc/fstab 2>/dev/null; then
+ for i in /var/tmp /tmp /usr/portage/distfiles; do
+ [ ! -d "${CHROOT}${i}" ] && mkdir -p
"${CHROOT}${i}"
+ done
+
+ cat > "${CHROOT}"/etc/fstab << FSTAB
+aufs / aufs defaults 0 0
+vartmp /var/tmp tmpfs defaults 0 0
+tmp /tmp tmpfs defaults 0 0
+distfiles /usr/portage/distfiles tmpfs defaults 0 0
+FSTAB
+ fi
if ${AUFS_MODULES}; then
warn_msg "Adding all modules in $MODULESD/modules/"
@@ -990,22 +1000,6 @@ then
chmod 755 "${CHROOT}${i}"
done
- # This will prevent from putting junk on the CHANGESDEV
- 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="${i} ${str}"
- done
-
- warn_msg "${str}are mounted in ram"
- warn_msg "consider saving important files elsewhere"
-
- sleep 2
-
for i in ${CDROOT_PATH} ${overlay} ${static}; do
mount --move ${NEW_ROOT}${i} ${CHROOT}${i}
done