From d73645facb398b78e940855bf121e451ef4f350c Mon Sep 17 00:00:00 2001 From: JRGTH Date: Thu, 8 Jul 2021 17:41:27 -0400 Subject: [PATCH] Add the new tgz compress format to UFS systems too --- usr/local/share/bastille/export.sh | 2 +- usr/local/share/bastille/import.sh | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/usr/local/share/bastille/export.sh b/usr/local/share/bastille/export.sh index a76708b5..a8f678ce 100644 --- a/usr/local/share/bastille/export.sh +++ b/usr/local/share/bastille/export.sh @@ -154,7 +154,7 @@ if [ -n "${TXZ_EXPORT}" -o -n "${TGZ_EXPORT}" ] && [ -n "${SAFE_EXPORT}" ]; then fi if [ -z "${bastille_zfs_enable}" ]; then - if [ -n "${GZIP_EXPORT}" -o -n "${RAW_EXPORT}" -o "${SAFE_EXPORT}" -o "${OPT_ZSEND}" ]; then + if [ -n "${GZIP_EXPORT}" -o -n "${RAW_EXPORT}" -o -n "${SAFE_EXPORT}" -o "${OPT_ZSEND}" = "-Rv" ]; then error_exit "Options --gz, --raw, --safe, --verbose are valid for ZFS configured systems only." fi fi diff --git a/usr/local/share/bastille/import.sh b/usr/local/share/bastille/import.sh index a68387ea..fb9b1a98 100644 --- a/usr/local/share/bastille/import.sh +++ b/usr/local/share/bastille/import.sh @@ -487,6 +487,9 @@ jail_import() { if [ "${FILE_EXT}" = ".txz" ]; then info "Extracting files from '${TARGET}' archive..." tar -Jxf "${bastille_backupsdir}/${TARGET}" -C "${bastille_jailsdir}" + elif [ "${FILE_EXT}" = ".tgz" ]; then + info "Extracting files from '${TARGET}' archive..." + tar -xf "${bastille_backupsdir}/${TARGET}" -C "${bastille_jailsdir}" elif [ "${FILE_EXT}" = ".tar.gz" ]; then # Attempt to import/configure foreign/ezjail container info "Extracting files from '${TARGET}' archive..."