Commit 5dc0eaf3 authored by Oleksandr Usov's avatar Oleksandr Usov
Browse files

zfs: When ZFS is calling external helper scripts (such as stuff from

/etc/zfs/zpool.d or zfs_prepare_disk it uses reduced PATH.
This fixes it to use NixOS system path, and not FHS.
parent d920659b
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -152,6 +152,11 @@ let
               ]
             }"

          # substitute path that ZFS will pass on when calling external helper scripts (/etc/zfs/zpool.d/*, zfs_prepare_disk)
          substituteInPlace ./lib/libzfs/libzfs_util.c \
            --replace-fail \"PATH=/bin:/sbin:/usr/bin:/usr/sbin\" \
            \"PATH=/run/wrappers/bin:/run/current-system/sw/bin:/run/current-system/sw/sbin\"

          substituteInPlace ./config/zfs-build.m4 \
            --replace-fail "bashcompletiondir=/etc/bash_completion.d" \
              "bashcompletiondir=$out/share/bash-completion/completions"