Skip to content

Commit

Permalink
Remove absolute paths to udev rules and binaries for dracut
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Andrew J. Hesford <[email protected]>
Signed-off-by: Savyasachee Jha <[email protected]>
Closes openzfs#13010
  • Loading branch information
savyajha authored and nicman23 committed Aug 22, 2022
1 parent aa4dac8 commit 7c31a03
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions contrib/dracut/90zfs/module-setup.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit 7c31a03

Please sign in to comment.