14 lines
338 B
Bash
Executable File
14 lines
338 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
P="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/run/current-system/sw/bin"
|
|
|
|
for p in $(echo $P | cut -d ":" -f 1- --output-delimiter=" "); do
|
|
if [[ -f "/host${p}/zfs" ]]; then
|
|
chroot /host "${p}/zfs" "${@:1}"
|
|
exit $?
|
|
fi
|
|
done
|
|
|
|
chroot /host /usr/bin/env -i PATH="${P}" zfs "${@:1}"
|
|
exit $?
|