From 9af1f8788cf462ffa071481e090098061a50152d Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Tue, 6 Aug 2013 15:53:34 +0200 Subject: [PATCH] gen_initramfs: do not hardcode udevdir but use pkg-config Thanks to Martin Wegner for the original patch, I just cleaned it up a bit and committed. --- gen_initramfs.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/gen_initramfs.sh b/gen_initramfs.sh index 095d352..756aefb 100755 --- a/gen_initramfs.sh +++ b/gen_initramfs.sh @@ -566,15 +566,16 @@ append_udev() { rm -r "${TEMP}/initramfs-udev-temp" fi + local udev_dir="$(pkg-config --variable udevdir udev)" udev_files=" - /lib/udev/rules.d/50-udev-default.rules - /lib/udev/rules.d/60-persistent-storage.rules - /lib/udev/rules.d/80-drivers.rules + ${udev_dir}/rules.d/50-udev-default.rules + ${udev_dir}/rules.d/60-persistent-storage.rules + ${udev_dir}/rules.d/80-drivers.rules /etc/udev/udev.conf " udev_maybe_files=" - /lib/udev/rules.d/40-gentoo.rules - /lib/udev/rules.d/99-systemd.rules + ${udev_dir}/rules.d/40-gentoo.rules + ${udev_dir}/rules.d/99-systemd.rules /etc/modprobe.d/blacklist.conf " is_maybe=0 @@ -597,8 +598,8 @@ append_udev() { # Copy binaries copy_binaries "${TEMP}/initramfs-udev-temp" \ - /sbin/udevd /bin/udevadm /lib/udev/scsi_id \ - /lib/udev/ata_id /lib/udev/mtd_probe + /sbin/udevd /bin/udevadm "${udev_dir}/scsi_id" \ + "${udev_dir}/ata_id" "${udev_dir}/mtd_probe" cd "${TEMP}/initramfs-udev-temp/" log_future_cpio_content