tmp_bind_change_ip.sh,tmp_bind_change_ttl.sh: fix errors.

This commit is contained in:
Christoph 2023-12-25 21:50:16 +01:00
parent f91c31b250
commit 38957e58c1
3 changed files with 22 additions and 12 deletions

View File

@ -602,17 +602,22 @@ while IFS='' read -r _line || [[ -n $_line ]] ; do
shopt -u extglob
fi
if [[ -n "${zone_file}" ]] ; then
if $_is_master && [[ -n "${zone_file}" ]] ; then
if [[ ! -f "${zone_file}" ]] ; then
if ! containsElement "${zone_file}" "${zonefiles_not_present_arr[@]}" ; then
zonefiles_not_present_arr+=("${zone_file}")
fi
_is_master=false
_found=false
zone_file=""
continue
else
if ! $(echo ${zone_file} | grep -q -e "$ZONE_FILE_MASTER_DIR" 2> /dev/null) ; then
_is_master=false
_found=false
zone_file=""
continue
fi
if ! $(echo ${zone_file} | grep -q -e "$ZONE_FILE_MASTER_DIR" 2> /dev/null) ; then
fatal "Zonefile to change does not live in directory '$ZONE_FILE_MASTER_DIR'!
Zonefile to change: \033[33m${zone_file}\033[m"
fi
fi

View File

@ -599,17 +599,22 @@ while IFS='' read -r _line || [[ -n $_line ]] ; do
shopt -u extglob
fi
if [[ -n "${zone_file}" ]] ; then
if $_is_master && [[ -n "${zone_file}" ]] ; then
if [[ ! -f "${zone_file}" ]] ; then
if ! containsElement "${zone_file}" "${zonefiles_not_present_arr[@]}" ; then
zonefiles_not_present_arr+=("${zone_file}")
fi
_is_master=false
_found=false
zone_file=""
continue
else
if ! $(echo ${zone_file} | grep -q -e "$ZONE_FILE_MASTER_DIR" 2> /dev/null) ; then
_is_master=false
_found=false
zone_file=""
continue
fi
if ! $(echo ${zone_file} | grep -q -e "$ZONE_FILE_MASTER_DIR" 2> /dev/null) ; then
fatal "Zonefile to change does not live in directory '$ZONE_FILE_MASTER_DIR'!
Zonefile to change: \033[33m${zone_file}\033[m"
fi
fi