commit:     8f98a77a94aac23dce90a71f5623fe8dbcc1783b
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Sun Sep  3 06:25:26 2017 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Sun Sep  3 06:28:16 2017 +0000
URL:        https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=8f98a77a

gen_initramfs: ensure LVM config options are suitable from initramfs.

Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>

 gen_initramfs.sh | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/gen_initramfs.sh b/gen_initramfs.sh
index 0e66c66..62a88c8 100755
--- a/gen_initramfs.sh
+++ b/gen_initramfs.sh
@@ -416,11 +416,22 @@ append_lvm(){
 #              ret=$?
 #              if [ ${ret} != 0 ]
 #              then
-                       cp /etc/lvm/lvm.conf 
"${TEMP}/initramfs-lvm-temp/etc/lvm/" ||
+                       cp /etc/lvm/lvm.conf 
"${TEMP}/initramfs-lvm-temp/etc/lvm/" || \
                                gen_die 'Could not copy over lvm.conf!'
 #              else
 #                      gen_die 'Could not copy over lvm.conf!'
 #              fi
+
+               # Some LVM config options need changing, because the 
functionality is
+               # not compiled in:
+               sed -r -i \
+                       -e '/^[[:space:]]*obtain_device_list_from_udev/s,=.*,= 
0,g' \
+                       -e '/^[[:space:]]*use_lvmetad/s,=.*,= 0,g' \
+                       -e '/^[[:space:]]*monitoring/s,=.*,= 0,g' \
+                       -e '/^[[:space:]]*external_device_info_source/s,=.*,= 
"none",g' \
+                       -e '/^[[:space:]]*units/s,=.*"r",= "h",g' \
+                       "${TEMP}/initramfs-lvm-temp/etc/lvm/lvm.conf" || \
+                               gen_die 'Could not sed lvm.conf!'
        fi
        cd "${TEMP}/initramfs-lvm-temp/"
        log_future_cpio_content

Reply via email to