Merge pull request #103307 from grahamc/zfs-scripts

zfs: extend zpool scripts with :$PATH, remove sudo
This commit is contained in:
Graham Christensen 2020-11-10 10:20:02 -05:00 committed by GitHub
commit f9121be82e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -161,10 +161,11 @@ let
(cd $out/share/bash-completion/completions; ln -s zfs zpool) (cd $out/share/bash-completion/completions; ln -s zfs zpool)
''; '';
postFixup = '' postFixup = let
path="PATH=${makeBinPath [ coreutils gawk gnused gnugrep utillinux smartmontools sysstat sudo ]}" path = "PATH=${makeBinPath [ coreutils gawk gnused gnugrep utillinux smartmontools sysstat ]}:$PATH";
in ''
for i in $out/libexec/zfs/zpool.d/*; do for i in $out/libexec/zfs/zpool.d/*; do
sed -i "2i$path" $i sed -i '2i${path}' $i
done done
''; '';