diff options
author | erdgeist <erdgeist@erdgeist.org> | 2007-11-27 22:11:59 +0000 |
---|---|---|
committer | erdgeist <erdgeist@erdgeist.org> | 2007-11-27 22:11:59 +0000 |
commit | a1d5d325542dddd500605102854435c561163c79 (patch) | |
tree | dfea6e29ddb8a1640a2dccc961bdfb3e2af58dd1 | |
parent | 3ecbd167719afcbf9e9fa6e0087abe9cbd2005a9 (diff) |
Allow for specifying - as filename if archiving to stdout is desired.
-rwxr-xr-x | ezjail-admin | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/ezjail-admin b/ezjail-admin index f1a5b0c..5fa2f6a 100755 --- a/ezjail-admin +++ b/ezjail-admin | |||
@@ -826,16 +826,18 @@ 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%%[!/]*}" ] || ezjail_archive="${ezjail_archivedir}/${ezjail_archive}" | 829 | [ "${ezjail_archive%%[!/]*}" -a ${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 | *.tar.gz|*.tgz) ;; | 833 | -) unset ezjail_archive_opt;; |
834 | *) ezjail_archive="${ezjail_archive}.tar.gz" ;; | 834 | *) ezjail_archive="${ezjail_archive}.tar.gz" |
835 | esac; | 835 | # Fall through intended |
836 | *.tar.gz|*.tgz) ezjail_archive_opt="-f ${ezjail_archive}";; | ||
837 | esac | ||
836 | 838 | ||
837 | cd "${ezjail_rootdir}" || exerr "Error: can't cd to ${ezjail_root}." | 839 | cd "${ezjail_rootdir}" || exerr "Error: can't cd to ${ezjail_root}." |
838 | pax -wXtz -x ustar -f "${ezjail_archive}" \ | 840 | pax -wXtz -x ustar "${ezjail_archive_opt}" \ |
839 | -s:"^[^\\.].*/ezjail\\.conf\$":ezjail.conf: \ | 841 | -s:"^[^\\.].*/ezjail\\.conf\$":ezjail.conf: \ |
840 | -s:"^[^\\.].*/${ezjail_safename}\$":prop.ezjail_${ezjail_archive_tag}: \ | 842 | -s:"^[^\\.].*/${ezjail_safename}\$":prop.ezjail_${ezjail_archive_tag}: \ |
841 | -s:"^[^\\.].*/${ezjail_safename}.norun\$":prop.ezjail_${ezjail_archive_tag}.norun: \ | 843 | -s:"^[^\\.].*/${ezjail_safename}.norun\$":prop.ezjail_${ezjail_archive_tag}.norun: \ |