1-get-initial-setup-working #2

Merged
hygienic-books merged 92 commits from 1-get-initial-setup-working into main 2023-03-05 03:02:48 +00:00
Showing only changes of commit e21e7381f9 - Show all commits

View File

@ -87,7 +87,7 @@ function we_have_exactly_one_part () {
function no_zpool_exists () { function no_zpool_exists () {
declare zpool_list declare zpool_list
zpool_list="$(zpool list -H)" zpool_list="$(zpool list -H)"
[[ "$(wc -l <<<"${zpool_list}")" -eq '0' ]] && return 0 [[ "$(wc -l <<<"${zpool_list}")" -le '1' ]] && [[ "$(wc -c <<<"${zpool_list}")" -le '1' ]] && return 0
return 1 return 1
} }
@ -167,6 +167,9 @@ function setup_zpool () {
create_home_dataset create_home_dataset
export_pool export_pool
import_pool import_pool
else
printf -- '%s\n' 'A zpool already exists, that is unexpected. Cowardly exiting 1 ...'
exit 1
fi fi
} }