mirror of
https://github.com/nix-community/disko.git
synced 2026-11-30 13:03:28 +01:00
zpool: better error message if zpool has no assigned devices
This commit is contained in:
1 parent
736c8150b9
commit
8f0f75f1a8
1 file changed
+4
@@ -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
|
||||
|
||||
Reference in new issue
Block a user