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 1A71D138C9D for ; Wed, 29 Apr 2015 19:04:18 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C18BFE089A; Wed, 29 Apr 2015 19:04:16 +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 6ACF6E089A for ; Wed, 29 Apr 2015 19:04:16 +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 8F86B340C99 for ; Wed, 29 Apr 2015 19:04:15 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 628449B5 for ; Wed, 29 Apr 2015 19:04:08 +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: <1430328705.98da3645c1cd72895af0c9131db6024388f63af2.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: 98da3645c1cd72895af0c9131db6024388f63af2 X-VCS-Branch: aufs Date: Wed, 29 Apr 2015 19:04:08 +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: c5f5aa54-9644-462c-8968-1c4352b0fa86 X-Archives-Hash: 9ee2a35e6fc6a7ac07f7244a6bfdca89 commit: 98da3645c1cd72895af0c9131db6024388f63af2 Author: Fernando Reyes (likewhoa) missionaccomplish com> AuthorDate: Wed Jun 4 23:04:30 2014 +0000 Commit: Richard Farina gentoo org> CommitDate: Wed Apr 29 17:31:45 2015 +0000 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=98da3645 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