* Koristi Require u predloscima, umjesto Order i Allow direktiva.
* Default vrijednost za Options direktivu u predloscima (kao primjer).
* Aktivacija modula access_compat.
+ * Ignoriranje datoteka ciji nazivi zavrsavaju s ~, .old, .staro,
+ .bkp, .bak, .swp, .tmp, .dpkg-* i .cn-*.
-- Dragan Dosen <Dragan.Dosen@CARNet.hr> Thu, 06 Oct 2016 10:51:58 +0200
cp_echo "CN: Doing backup for all files in $dir"
for file in ${dir}/*; do
if [ -f "$file" ]; then
- if [ -z "$(echo $file | egrep '^/.*~')" ]; then
+ if [ -z "$(echo "$file" | egrep '^/.*(~|(\.(old|staro|bkp|bak|swp|tmp|dpkg-.+|cn-.+)))$')" ]; then
backup_dir="$BACKUPDIR/$(basename $(dirname "$file"))"
cp_backup_conffile -d "$backup_dir" -p "$file"
fi
if [ -d "${dir}" ] && [ -n "$(ls -A ${dir}/)" ]; then
mkdir -p "$newdir"
for file in ${dir}/*; do
+ [ -z "$(echo "$file" | egrep '^/.*(~|(\.(old|staro|bkp|bak|swp|tmp|dpkg-.+|cn-.+)))$')" ] || continue
newfile="${newdir}/$(basename "$file" .conf).conf"
if [ ! -e "$newfile" ]; then
cp_echo "CN: Preserving changes to $newfile (renamed from $file)."
if [ -d "${edir}" ] && [ -n "$(ls -A ${edir}/)" ]; then
mkdir -p "$adir"
for efile in ${edir}/*; do
+ [ -z "$(echo "$efile" | egrep '^/.*(~|(\.(old|staro|bkp|bak|swp|tmp|dpkg-.+|cn-.+)))$')" ] || continue
+
[ ! -e "${edir}/$(basename "$efile" .conf).conf" ] || continue
afile="$(readlink -q -m "$efile")"