mirror of
https://github.com/BastilleBSD/bastille.git
synced 2025-12-16 02:36:00 +01:00
Update setup.sh - fail setup on multiple zpool detection
This commit is contained in:
@@ -123,6 +123,10 @@ configure_zfs() {
|
||||
else
|
||||
## attempt to determine bastille_zroot from `zpool list`
|
||||
bastille_zroot=$(zpool list | grep -v NAME | awk '{print $1}')
|
||||
if [ $(echo "${bastille_zroot}" | wc -l) -gt 1 ]; then
|
||||
error_notify "Error: Multiple zfs pools available:\n"${bastille_zroot}""
|
||||
error_exit "Set desired pool using \"sysrc -f "${bastille_config}" bastille_zfs_zpool=ZPOOL_NAME\""
|
||||
fi
|
||||
sysrc -f "${bastille_config}" bastille_zfs_enable=YES
|
||||
sysrc -f "${bastille_config}" bastille_zfs_zpool="${bastille_zroot}"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user