1-get-initial-setup-working #2
5
setup.sh
5
setup.sh
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user