mirror of
https://github.com/nix-community/disko
synced 2024-11-10 06:14:14 +00:00
zpool: better error message if zpool has no assigned devices
This commit is contained in:
parent
736c8150b9
commit
8f0f75f1a8
1 changed files with 4 additions and 0 deletions
|
@ -148,6 +148,10 @@ in
|
|||
in
|
||||
''
|
||||
readarray -t zfs_devices < <(cat "$disko_devices_dir"/zfs_${config.name})
|
||||
if [ ''${#zfs_devices[@]} -eq 0 ]; then
|
||||
echo "no devices found for zpool ${config.name}. Did you misspell the pool name?" >&2
|
||||
exit 1
|
||||
fi
|
||||
# Try importing the pool without mounting anything if it exists.
|
||||
# This allows us to set mounpoints.
|
||||
if zpool import -N -f '${config.name}' || zpool list '${config.name}'; then
|
||||
|
|
Loading…
Reference in a new issue