diff options
author | 2014-05-30 04:46:09 +0200 | |
---|---|---|
committer | 2015-04-29 13:31:45 -0400 | |
commit | dbf39867145b304b63ade4f52c21f28d4ea8aa89 (patch) | |
tree | 7748e699377584a6207ede72e9b0b3fb6b4863da | |
parent | Wording changes, cosmetic crap (diff) | |
download | genkernel-dbf39867145b304b63ade4f52c21f28d4ea8aa89.tar.gz genkernel-dbf39867145b304b63ade4f52c21f28d4ea8aa89.tar.bz2 genkernel-dbf39867145b304b63ade4f52c21f28d4ea8aa89.zip |
Better handle on if aufs.modules kernel parameter is used
-rwxr-xr-x | defaults/initrd.defaults | 1 | ||||
-rw-r--r-- | defaults/linuxrc | 22 |
2 files changed, 14 insertions, 9 deletions
diff --git a/defaults/initrd.defaults b/defaults/initrd.defaults index 9937e008..b08ff50c 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 009b4c44..281de8e4 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}" |