From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-730395-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	by finch.gentoo.org (Postfix) with ESMTP id 762A613877A
	for <garchives@archives.gentoo.org>; Fri,  5 Sep 2014 16:09:57 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 321DAE0AA7;
	Fri,  5 Sep 2014 16:09:56 +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 80642E0AA4
	for <gentoo-commits@lists.gentoo.org>; 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 6DF973400C8
	for <gentoo-commits@lists.gentoo.org>; 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 D93AB4CAA
	for <gentoo-commits@lists.gentoo.org>; Fri,  5 Sep 2014 16:09:51 +0000 (UTC)
From: "Richard Farina" <zerochaos@gentoo.org>
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" <zerochaos@gentoo.org>
Message-ID: <1403565075.4de1a998da8b1d67a28c878085d6a7441566b95c.zerochaos@gentoo>
Subject: [gentoo-commits] proj/genkernel:aufs commit in: defaults/
X-VCS-Repository: proj/genkernel
X-VCS-Files: defaults/initrd.defaults defaults/linuxrc
X-VCS-Directories: defaults/
X-VCS-Committer: zerochaos
X-VCS-Committer-Name: Richard Farina
X-VCS-Revision: 4de1a998da8b1d67a28c878085d6a7441566b95c
X-VCS-Branch: aufs
Date: Fri,  5 Sep 2014 16:09:51 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: bdb24dae-a942-4a8b-ab47-e2ec102ab35b
X-Archives-Hash: affc17c8d4ee25dce05dc41420e081dc

commit:     4de1a998da8b1d67a28c878085d6a7441566b95c
Author:     Fernando Reyes (likewhoa) <design <AT> missionaccomplish <DOT> com>
AuthorDate: Fri May 30 02:46:09 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=4de1a998

Better handle on if aufs.modules kernel parameter is used

---
 defaults/initrd.defaults |  1 +
 defaults/linuxrc         | 22 +++++++++++++---------
 2 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/defaults/initrd.defaults b/defaults/initrd.defaults
index 1f28883..1e1a539 100755
--- a/defaults/initrd.defaults
+++ b/defaults/initrd.defaults
@@ -68,6 +68,7 @@ CDROOT_PATH='/mnt/cdrom'
 CDROOT_MARKER='/livecd'
 
 # AUFS variables
+AUFS_MODULES=false
 AUFS_CHANGES=false
 AUFS_CHANGESFILE=livecd.aufs
 

diff --git a/defaults/linuxrc b/defaults/linuxrc
index 009b4c4..281de8e 100644
--- a/defaults/linuxrc
+++ b/defaults/linuxrc
@@ -284,6 +284,7 @@ do
 		# Allow user to specify the modules location
 		aufs.modules\=*)
 			MODULESD=${x#*=}
+                        AUFS_MODULES=true
 		;;
 		unionfs)
 			if [ ! -x /sbin/unionfs ]
@@ -839,15 +840,18 @@ then
                 test ! $(grep -o ^aufs "${CHROOT}"/etc/fstab) &&
                         echo "aufs / aufs defaults 0 0" > "${CHROOT}"/etc/fstab
 
-		warn_msg "Adding all modules in $MODULESD/modules/"
-		if [ -z "${MODULESD}" ]
-		then
-			union_insert_modules ${CDROOT_PATH}
-		else
-			mkdir ${NEW_ROOT}/mnt/modulesd
-			mount "${MODULESD}" ${NEW_ROOT}/mnt/modulesd
-			union_insert_modules ${NEW_ROOT}/mnt/modulesd
-		fi
+                if ${AUFS_MODULES}; then
+                        warn_msg "Adding all modules in $MODULESD/modules/"
+
+                        if [ -z "${MODULESD}" ]
+                        then
+		                union_insert_modules ${CDROOT_PATH}
+		        else
+			        mkdir ${NEW_ROOT}/mnt/modulesd
+			        mount "${MODULESD}" ${NEW_ROOT}/mnt/modulesd
+			        union_insert_modules ${NEW_ROOT}/mnt/modulesd
+                        fi
+                fi
 
                 # Create the directories for our new union mounts
                 test ! -d "${CHROOT}${NEW_ROOT}" && mkdir -p "${CHROOT}${NEW_ROOT}"