summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xezjail-admin15
1 files changed, 8 insertions, 7 deletions
diff --git a/ezjail-admin b/ezjail-admin
index 5fa2f6a..63a46be 100755
--- a/ezjail-admin
+++ b/ezjail-admin
@@ -826,18 +826,19 @@ archive)
826 [ "${ezjail_archive}" ] || ezjail_archive="${ezjail_archive_tag}.tar.gz" 826 [ "${ezjail_archive}" ] || ezjail_archive="${ezjail_archive_tag}.tar.gz"
827 827
828 # if archive location is not absolute, prepend archive directory 828 # if archive location is not absolute, prepend archive directory
829 [ "${ezjail_archive%%[!/]*}" -a ${ezjail_archive} != "-" ] || ezjail_archive="${ezjail_archivedir}/${ezjail_archive}" 829 [ "${ezjail_archive%%[!/]*}" -o ${ezjail_archive} = "-" ] || ezjail_archive="${ezjail_archivedir}/${ezjail_archive}"
830 830
831 # It's a tar archive, after all 831 # It's a tar archive, after all
832 case ${ezjail_archive} in 832 case ${ezjail_archive} in
833 -) unset ezjail_archive_opt;; 833 *.tar.gz|*.tgz|-) ;;
834 *) ezjail_archive="${ezjail_archive}.tar.gz" 834 *) ezjail_archive="${ezjail_archive}.tar.gz";;
835 # Fall through intended
836 *.tar.gz|*.tgz) ezjail_archive_opt="-f ${ezjail_archive}";;
837 esac 835 esac
838 836
837 # For stdout do specify nothing
838 [ "${ezjail_archive}" = "-" ] && unset ezjail_archive_opt || ezjail_archive_opt="-f ${ezjail_archive}"
839
839 cd "${ezjail_rootdir}" || exerr "Error: can't cd to ${ezjail_root}." 840 cd "${ezjail_rootdir}" || exerr "Error: can't cd to ${ezjail_root}."
840 pax -wXtz -x ustar "${ezjail_archive_opt}" \ 841 pax -wXtz -x ustar ${ezjail_archive_opt} \
841 -s:"^[^\\.].*/ezjail\\.conf\$":ezjail.conf: \ 842 -s:"^[^\\.].*/ezjail\\.conf\$":ezjail.conf: \
842 -s:"^[^\\.].*/${ezjail_safename}\$":prop.ezjail_${ezjail_archive_tag}: \ 843 -s:"^[^\\.].*/${ezjail_safename}\$":prop.ezjail_${ezjail_archive_tag}: \
843 -s:"^[^\\.].*/${ezjail_safename}.norun\$":prop.ezjail_${ezjail_archive_tag}.norun: \ 844 -s:"^[^\\.].*/${ezjail_safename}.norun\$":prop.ezjail_${ezjail_archive_tag}.norun: \
@@ -853,7 +854,7 @@ archive)
853 854
854 # To the next jail on command line 855 # To the next jail on command line
855 shift 1 856 shift 1
856 unset ezjail_archive 857 unset ezjail_archive ezjail_archive_opt
857 done 858 done
858 ;; 859 ;;
859####################### ezjail-admin RESTORE ######################## 860####################### ezjail-admin RESTORE ########################