diff --git a/testing/helpers/image.sh b/testing/helpers/image.sh index 92979b1..662b4d9 100755 --- a/testing/helpers/image.sh +++ b/testing/helpers/image.sh @@ -98,10 +98,8 @@ if [ -z "${EXISTING_POOL}" ]; then ENCRYPT_OPTS+=( "-O" "keylocation=file://${ENCRYPT_KEYFILE}" ) fi - if [ -n "${LEGACY_POOL}" ]; then - LEGACY_OPTS=( "-o" "compatibility=zol-0.8" ) - else - LEGACY_OPTS=() + if [ -n "${POOL_COMPAT}" ]; then + COMPAT=( "-o" "compatibility=${POOL_COMPAT}" ) fi if zpool create -f -m none \ @@ -111,7 +109,7 @@ if [ -z "${EXISTING_POOL}" ]; then -O relatime=on \ -o autotrim=on \ -o cachefile=none \ - "${LEGACY_OPTS[@]}" \ + "${POOL_COMPAT:+${COMPAT[@]}}" \ "${ENCRYPT_OPTS[@]}" \ "${zpool_name}" "${LOOP_DEV}"; then export ZBM_POOL="${zpool_name}" diff --git a/testing/setup.sh b/testing/setup.sh index 2b68a82..8049a46 100755 --- a/testing/setup.sh +++ b/testing/setup.sh @@ -19,6 +19,9 @@ DISTROS=() dictfile="/usr/share/dict/words" usage() { + local compat_dir + compat_dir="/usr/share/zfs/compatibility.d/" + cat </dev/null 2>&1; then SUDO=doas elif command -v sudo >/dev/null 2>&1; then