commit: 9b67915cb1ccb5299dd43b5afee81c53b022ef23
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: Tue Aug 11 18:21:15 2015 +0000
URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=9b67915c
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 9937e00..b08ff50 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}"