From 2263c0df2e696d69496856c8f5344456855c0a9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rn=20=C3=85ne=20de=20Jong?= Date: Sun, 1 May 2022 17:14:27 +0200 Subject: [PATCH] Shorter duplicate zpool check --- opennebula-images/freebsd-zfs-build-opennebula-image.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opennebula-images/freebsd-zfs-build-opennebula-image.sh b/opennebula-images/freebsd-zfs-build-opennebula-image.sh index 4964c16..e0d687b 100755 --- a/opennebula-images/freebsd-zfs-build-opennebula-image.sh +++ b/opennebula-images/freebsd-zfs-build-opennebula-image.sh @@ -19,7 +19,7 @@ ZPOOL=zroot ONE_CONTEXT_PKG_URL="https://github.com/OpenNebula/addon-context-linux/releases/download/v6.2.0/one-context-6.2.0_1.txz" -if [ "$(zpool list -Ho name $ZPOOL || true)" = $ZPOOL ]; then +if zpool list -Ho name $ZPOOL 2>/dev/null; then echo "The pool $ZPOOL is already imported." >&2 exit 1 fi