1 |
commit: dbf39867145b304b63ade4f52c21f28d4ea8aa89 |
2 |
Author: Fernando Reyes (likewhoa) <design <AT> missionaccomplish <DOT> com> |
3 |
AuthorDate: Fri May 30 02:46:09 2014 +0000 |
4 |
Commit: Richard Farina <zerochaos <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Apr 29 17:31:45 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=dbf39867 |
7 |
|
8 |
Better handle on if aufs.modules kernel parameter is used |
9 |
|
10 |
defaults/initrd.defaults | 1 + |
11 |
defaults/linuxrc | 22 +++++++++++++--------- |
12 |
2 files changed, 14 insertions(+), 9 deletions(-) |
13 |
|
14 |
diff --git a/defaults/initrd.defaults b/defaults/initrd.defaults |
15 |
index 9937e00..b08ff50 100755 |
16 |
--- a/defaults/initrd.defaults |
17 |
+++ b/defaults/initrd.defaults |
18 |
@@ -68,6 +68,7 @@ CDROOT_PATH='/mnt/cdrom' |
19 |
CDROOT_MARKER='/livecd' |
20 |
|
21 |
# AUFS variables |
22 |
+AUFS_MODULES=false |
23 |
AUFS_CHANGES=false |
24 |
AUFS_CHANGESFILE=livecd.aufs |
25 |
|
26 |
|
27 |
diff --git a/defaults/linuxrc b/defaults/linuxrc |
28 |
index 009b4c4..281de8e 100644 |
29 |
--- a/defaults/linuxrc |
30 |
+++ b/defaults/linuxrc |
31 |
@@ -284,6 +284,7 @@ do |
32 |
# Allow user to specify the modules location |
33 |
aufs.modules\=*) |
34 |
MODULESD=${x#*=} |
35 |
+ AUFS_MODULES=true |
36 |
;; |
37 |
unionfs) |
38 |
if [ ! -x /sbin/unionfs ] |
39 |
@@ -839,15 +840,18 @@ then |
40 |
test ! $(grep -o ^aufs "${CHROOT}"/etc/fstab) && |
41 |
echo "aufs / aufs defaults 0 0" > "${CHROOT}"/etc/fstab |
42 |
|
43 |
- warn_msg "Adding all modules in $MODULESD/modules/" |
44 |
- if [ -z "${MODULESD}" ] |
45 |
- then |
46 |
- union_insert_modules ${CDROOT_PATH} |
47 |
- else |
48 |
- mkdir ${NEW_ROOT}/mnt/modulesd |
49 |
- mount "${MODULESD}" ${NEW_ROOT}/mnt/modulesd |
50 |
- union_insert_modules ${NEW_ROOT}/mnt/modulesd |
51 |
- fi |
52 |
+ if ${AUFS_MODULES}; then |
53 |
+ warn_msg "Adding all modules in $MODULESD/modules/" |
54 |
+ |
55 |
+ if [ -z "${MODULESD}" ] |
56 |
+ then |
57 |
+ union_insert_modules ${CDROOT_PATH} |
58 |
+ else |
59 |
+ mkdir ${NEW_ROOT}/mnt/modulesd |
60 |
+ mount "${MODULESD}" ${NEW_ROOT}/mnt/modulesd |
61 |
+ union_insert_modules ${NEW_ROOT}/mnt/modulesd |
62 |
+ fi |
63 |
+ fi |
64 |
|
65 |
# Create the directories for our new union mounts |
66 |
test ! -d "${CHROOT}${NEW_ROOT}" && mkdir -p "${CHROOT}${NEW_ROOT}" |