Add files via upload

This commit is contained in:
kneutron 2021-08-28 08:59:47 -05:00 committed by GitHub
parent 7f92a4dc91
commit c3693e947b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,9 +10,10 @@ function failexit () {
exit $1
}
if [ "$1" = "s" ]; then
if [ "$1" = "s" ] || [ "$1" = "" ]; then
# select ; REF: https://www.baeldung.com/linux/reading-output-into-array
[ $(zpool list) = "no pools available" ] && failexit 404 "No zfs pools"
tmptest=$(zpool list |head -n 1)
[ $"tmptest" = "no pools available" ] && failexit 404 "No zfs pools"
OIFS=$IFS
IFS=$'\n'