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