Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/freebsd/poudriere.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/share
diff options
context:
space:
mode:
authorJose Luis Duran <jlduran@gmail.com>2021-11-11 16:06:43 +0300
committerBaptiste Daroussin <bapt@FreeBSD.org>2021-11-29 17:55:36 +0300
commit164d0127cec116aa7f4be7236144be2f0696f9a2 (patch)
tree9b84abef391901dab4183915a2ae10d9dd4b5e91 /src/share
parent8d0342ef664048e212bc987db88bac75ba464851 (diff)
image_zfs: Fix inverted logic
`zpool list -Ho ${ZFS_POOL_NAME}` exits with `0` if the name exists. This prevents overwriting the existing pool.
Diffstat (limited to 'src/share')
-rw-r--r--src/share/poudriere/image_zfs.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/share/poudriere/image_zfs.sh b/src/share/poudriere/image_zfs.sh
index d3b0fa88..a4af764d 100644
--- a/src/share/poudriere/image_zfs.sh
+++ b/src/share/poudriere/image_zfs.sh
@@ -41,7 +41,7 @@ zfs_check()
[ -n "${IMAGESIZE}" ] || err 1 "Please specify the imagesize"
[ -n "${ZFS_POOL_NAME}" ] || err 1 "Please specify a pool name"
- zpool list -Ho name ${ZFS_POOL_NAME} >/dev/null 2>&1 || \
+ zpool list -Ho name ${ZFS_POOL_NAME} >/dev/null 2>&1 && \
err 1 "Target pool name already exists"
case "${IMAGENAME}" in
''|*[!A-Za-z0-9]*)