This does:
* fix get_transp() on non-bash
* re-indent of the code from #990745
* fix terminology: it's pool
* remove -e: I originally actually fixed -e,
but it turns out literally every bit that could fail
is already either || : or wasn't by accident (like in the #990745 code)
* simplify get_transp() and explain why we do it instead of matching nvme path
* use remove -L from the data we feed to lsblk, zpool w/o -L is measurably faster
* pipe the devices into while read to match rest of code
* use read -r in main loop
* match the userprop with case/esac instead of if tree
* shellcheck-clean the script
(cherry picked from debian-upstream[0]
commit 769a09407c6b65db981804a05a81ea63d004ebeb)
[0] https://salsa.debian.org/zfsonlinux-team/zfs
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Thanks to Miao Wang for get_transp() function
(cherry picked from debian-upstream[0]
commit 1f5433b15e4f7c823983bb90390c4b023f3d1948)
[0] https://salsa.debian.org/zfsonlinux-team/zfs
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
* Pull in the changes to the automatic scrub cronjob from
debian-upstream [0] commit
f6d45405df0a2ed2748975667e8ea50714034d13
* Add a script and cronjob for regular trimming of pools
* Change the logic to scrub/trim pools based on a per pool('s root
dataset property)
pulled the changes in as one commit instead of cherry-picking, since
the planned and reverted debconf questions would have caused
unneccessary churn.
commits identified by running:
`git log --full-diff -- debian/tree/zfsutils-linux/usr/lib/zfs-linux`
in a worktree from [0].
[0] https://salsa.debian.org/zfsonlinux-team/zfs/
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>