From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 6861013877A for ; Fri, 5 Sep 2014 16:10:00 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1199AE0AB2; Fri, 5 Sep 2014 16:09:57 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C16C5E0AC1 for ; Fri, 5 Sep 2014 16:09:55 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B133C3400A4 for ; Fri, 5 Sep 2014 16:09:54 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4893C4CB0 for ; Fri, 5 Sep 2014 16:09:52 +0000 (UTC) From: "Richard Farina" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Richard Farina" Message-ID: <1403565075.1409c54c01d3044be5d79697b2de14037cc0496a.zerochaos@gentoo> Subject: [gentoo-commits] proj/genkernel:aufs commit in: defaults/ X-VCS-Repository: proj/genkernel X-VCS-Files: defaults/linuxrc X-VCS-Directories: defaults/ X-VCS-Committer: zerochaos X-VCS-Committer-Name: Richard Farina X-VCS-Revision: 1409c54c01d3044be5d79697b2de14037cc0496a X-VCS-Branch: aufs Date: Fri, 5 Sep 2014 16:09:52 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: e5a17f34-ae28-4f85-ba75-b50aabe8f838 X-Archives-Hash: 08b4aef5d573012092d36eb1d50aef82 commit: 1409c54c01d3044be5d79697b2de14037cc0496a Author: Fernando Reyes (likewhoa) missionaccomplish com> AuthorDate: Wed Jun 4 23:04:30 2014 +0000 Commit: Richard Farina gentoo 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