[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Exclude dirs from archive



Hi,

Little change to make our life better, i.e. ability to exclude some big or unnecessary dirs from archive:

ezjail-admin archive ... -e "/var/tmp /tmp /usr/ports"

I'm not sure if it is correct, but works for me.

--
Savchuk Taras 

53c53
< ezjail_usage_archive="Usage: ${ezjail_admin} archive [-Af] [-a archive] [-d archivedir] jailname [jailname...]"
---
> ezjail_usage_archive="Usage: ${ezjail_admin} archive [-Af] [-a archive] [-d archivedir] [-e dirs to exclude from archive] jailname [jailname...]"
1130c1130
<   shift; while getopts :Afa:d: arg; do case ${arg} in
---
>   shift; while getopts :Afa:d:e: arg; do case ${arg} in
1134a1135
>     e) ezjail_excludedirs=${OPTARG};;
1155a1157,1165
>   # Make arg to exclude dirs from archive
>   tmp_excludedirs=""
>   if [ "$ezjail_excludedirs" ]; then
>     for substr in $ezjail_excludedirs; do
> 	tmp_excludedirs="$tmp_excludedirs -s:^.$substr.*::g"
>     done
>   fi
>   ezjail_excludedirs=$tmp_excludedirs
> 
1215a1226
>       $ezjail_excludedirs \