refactor(iso): Loically sort no_zpool_exists lower (#1)

This commit is contained in:
hygienic-books 2023-02-21 03:00:55 +01:00
parent ef03281a63
commit ed737409e6

View File

@ -127,6 +127,13 @@ function select_part () {
return 0
}
function no_zpool_exists () {
declare zpool_list
zpool_list="$(zpool list -H)"
[[ "$(wc -l <<<"${zpool_list}")" -le '1' ]] && [[ "$(wc -c <<<"${zpool_list}")" -le '1' ]] && return 0
return 1
}
function set_zpool_password () {
# May or may not have a newline at the end, ZFS doesn't care
printf -- '%s' 'password' > '/etc/zfs/'"${zpool_name}"'.key'