]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Remove absolute paths to udev rules and binaries for dracut
authorSavyasachee Jha <genghizkhan91@hawkradius.com>
Mon, 14 Feb 2022 12:45:16 +0000 (18:15 +0530)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 16 Feb 2022 23:26:08 +0000 (15:26 -0800)
Since dracut functions can locate both udev rules and binaries, there is
no point in keeping absolute paths in the module setup script. It also
breaks the --sysroot option in dracut. This commit removes mentions to
absolute paths for binaries and udev rules.

Reviewed-by: Ahelenia ZiemiaƄska <nabijaczleweli@nabijaczleweli.xyz>
Reviewed-by: Andrew J. Hesford <ajh@sideband.org>
Signed-off-by: Savyasachee Jha <hi@savyasacheejha.com>
Closes #13010

contrib/dracut/90zfs/module-setup.sh.in

index 5ab068632d1d8d79edffcfa726b8f35d87057344..81c541f49b72c375d8117eaca3a09737f5e08cb4 100755 (executable)
@@ -23,20 +23,13 @@ installkernel() {
 }
 
 install() {
-       for i in "90-zfs.rules" "69-vdev.rules" "60-zvol.rules"; do
-               if ! dracut_install "@udevdir@/$i"; then
-                       dfatal "Failed to install udev rule: $i"
-                       exit 1
-               fi
-       done
+       inst_rules 90-zfs.rules 69-vdev.rules 60-zvol.rules
        
        inst_multiple \
-               @sbindir@/zgenhostid \
-               @sbindir@/zfs \
-               @sbindir@/zpool \
-               @udevdir@/vdev_id \
-               @udevdir@/zvol_id \
-               @mounthelperdir@/mount.zfs \
+               zgenhostid \
+               zfs \
+               zpool \
+               mount.zfs \
                hostid \
                grep \
                awk \