git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #103307 from grahamc/zfs-scripts

zfs: extend zpool scripts with :$PATH, remove sudo

commitf9121be82e0a0cc6a6cf9140e86f889da7c6c9a4 authorGraham Christensen <graham@grahamc.com> dateTue 10 Nov 2020, 10:20 (6 years ago) parent9359148b3d4f5d
1 file changed+4−3
pkgs/os-specific/linux/zfs/default.nix+4−3
pkgs/os-specific/linux/zfs/default.nix+4−3
@@ -161,10 +161,11 @@ let
161161 (cd $out/share/bash-completion/completions; ln -s zfs zpool)
162162 '';
163163
164− postFixup = ''
165− path="PATH=${makeBinPath [ coreutils gawk gnused gnugrep utillinux smartmontools sysstat sudo ]}"
164+ postFixup = let
165+ path = "PATH=${makeBinPath [ coreutils gawk gnused gnugrep utillinux smartmontools sysstat ]}:$PATH";
166+ in ''
166167 for i in $out/libexec/zfs/zpool.d/*; do
167− sed -i "2i$path" $i
168+ sed -i '2i${path}' $i
168169 done
169170 '';
170171