Shorter duplicate zpool check

This commit is contained in:
Jørn Åne de Jong 2022-05-01 17:14:27 +02:00 committed by Nico Schottelius
parent 9e926a90dc
commit 2263c0df2e

View file

@ -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