refactor(iso): Loically sort no_zpool_exists lower (#1)
This commit is contained in:
parent
ef03281a63
commit
ed737409e6
7
setup.sh
7
setup.sh
@ -127,6 +127,13 @@ function select_part () {
|
|||||||
return 0
|
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 () {
|
function set_zpool_password () {
|
||||||
# May or may not have a newline at the end, ZFS doesn't care
|
# May or may not have a newline at the end, ZFS doesn't care
|
||||||
printf -- '%s' 'password' > '/etc/zfs/'"${zpool_name}"'.key'
|
printf -- '%s' 'password' > '/etc/zfs/'"${zpool_name}"'.key'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user