From 35efca1c2758caa21429cb33d83efbff110fc749 Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Fri, 26 Apr 2013 17:35:16 +0100 Subject: [PATCH] gen_initramfs: use portage-utils to determine the lvm2 udev rules files --- gen_initramfs.sh | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/gen_initramfs.sh b/gen_initramfs.sh index a591a97..6bf6ce8 100755 --- a/gen_initramfs.sh +++ b/gen_initramfs.sh @@ -319,14 +319,9 @@ append_lvm(){ mkdir -p "${TEMP}/initramfs-lvm-temp/etc/lvm/" print_info 1 'LVM: Adding support (copying binaries from system)...' - udev_files=" - /lib/udev/rules.d/95-dm-notify.rules - /lib/udev/rules.d/13-dm-disk.rules - /lib/udev/rules.d/10-dm.rules - /lib/udev/rules.d/69-dm-lvm-metad.rules - /lib/udev/rules.d/11-dm-lvm.rules - " - for f in ${udev_files}; do + udev_files=( $(qlist -e sys-fs/lvm2:0 | grep ^/lib/udev/rules.d) ) + for f in "${udev_files[@]}"; do + [ -f "${f}" ] || gen_die "append_lvm: not a file: ${f}" mkdir -p "${TEMP}/initramfs-lvm-temp"/$(dirname "${f}") || \ gen_die "cannot create rules.d directory" cp "${f}" "${TEMP}/initramfs-lvm-temp/${f}" || \