From f79e412dae929d875f8e31b4ee3beb63a91a2ba0 Mon Sep 17 00:00:00 2001 From: tschettervictor <85497460+tschettervictor@users.noreply.github.com> Date: Tue, 25 Nov 2025 15:36:10 -0700 Subject: [PATCH] export: rework error messages --- usr/local/share/bastille/export.sh | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/usr/local/share/bastille/export.sh b/usr/local/share/bastille/export.sh index 1a76b48d..614f8cf8 100644 --- a/usr/local/share/bastille/export.sh +++ b/usr/local/share/bastille/export.sh @@ -247,18 +247,14 @@ if [ "${COMP_OPTION}" -gt "1" ]; then error_exit "[ERROR]: Only one compression format can be used during export." fi -# Validate LIVE and AUTO -if ! checkyesno bastille_zfs_enable; then - if [ "${LIVE}" -eq 1 ]; then - error_exit "[ERROR]: [-l|--live] can only be used with ZFS." - fi -elif [ "${AUTO}" -eq 1 ] && [ "${LIVE}" -eq 1 ]; then +# Validate AUTO and LIVE +if [ "${AUTO}" -eq 1 ] && [ "${LIVE}" -eq 1 ]; then error_exit "[ERROR]: [-a|--auto] cannot be used with [-l|--live]." fi -# Don't allow LIVE with TXZ_EXPORT or TGZ_EXPORT +# Don't allow LIVE with T*_EXPORT if { [ "${TXZ_EXPORT}" -eq 1 ] || [ "${TGZ_EXPORT}" -eq 1 ] || [ "${TZST_EXPORT}" -eq 1 ]; } && [ "${LIVE}" -eq 1 ]; then - error_exit "[ERROR]: Archive mode cannot be used with [-l|--live]." + error_exit "[ERROR]: [-l|--live] cannot be used with simple archive modes." fi # Don't allow ZFS specific options if not enabled