Fix pathname substitution to prevent incorrect retrieval of soft links, when creating a jail from archive.

This commit is contained in:
erdgeist 2008-07-06 18:17:36 +00:00
parent 68704c8cc9
commit f36423bf6c

View File

@ -471,7 +471,7 @@ create)
unset ezjail_archive_opt unset ezjail_archive_opt
ezjail_makeabsolute ezjail_fromarchive ezjail_makeabsolute ezjail_fromarchive
[ "${ezjail_fromarchive}" = "-" ] && unset ezjail_archive_opt || ezjail_archive_opt="-f ${ezjail_fromarchive}" [ "${ezjail_fromarchive}" = "-" ] && unset ezjail_archive_opt || ezjail_archive_opt="-f ${ezjail_fromarchive}"
mkdir -p "${ezjail_rootdir}" && cd "${ezjail_rootdir}" && pax -rz -pe ${ezjail_archive_opt} -s:^ezjail/:: ezjail/* mkdir -p "${ezjail_rootdir}" && cd "${ezjail_rootdir}" && pax -rz -pe ${ezjail_archive_opt} -s:^ezjail:.: ezjail/*
[ $? -eq 0 ] || detach_images || exerr "Error: Could not extract archive from ${ezjail_fromarchive}." [ $? -eq 0 ] || detach_images || exerr "Error: Could not extract archive from ${ezjail_fromarchive}."
elif [ -z "${ezjail_exists}" ]; then elif [ -z "${ezjail_exists}" ]; then
# now take a copy of our template jail # now take a copy of our template jail