--- a/lib/pvl/hosts/zone.sh Thu Feb 26 22:36:05 2015 +0200
+++ b/lib/pvl/hosts/zone.sh Thu Feb 26 22:53:26 2015 +0200
@@ -33,10 +33,10 @@
function update_hosts_reverse {
local out="$1"
local src="$2"
- local srcs=($src/*)
+ local srcs=$src/*
local msg="$out: Generating reverse hosts zone: $src"
- if apply_check "$out" "${srcs[@]}"; then
+ if apply_check "$out" $srcs; then
log_skip "$msg"
else
log_apply "$msg"
@@ -108,7 +108,7 @@
local old=$(test -e "$out" && cat "$out" || echo '')
# test
- if [ "$SERIAL" = 1 ]; then
+ if [ "$UPDATE_SERIAL" = 1 ]; then
log_force "$out: Force serial $old <- $serial"
elif apply_check "$out" "${@:3}"; then
@@ -116,7 +116,7 @@
return
- elif [ "$SERIAL" = 0 ]; then
+ elif [ "$UPDATE_SERIAL" = 0 ]; then
log_noop "$out: Noop serial: $old <- $serial"
return
@@ -140,7 +140,7 @@
if [ -n "$serial" -a -f "$serial" ]; then
serial_opt="--serial=$(cat "$serial")"
- elif [ "$SERIAL" = 0 ]; then
+ elif [ "$UPDATE_SERIAL" = 0 ]; then
warn "$out: noop'd serial, omitting"
else
fail "$out: missing serial: $serial"
@@ -181,10 +181,10 @@
#
# Invokes `rndc reload`, showing its output.
function reload_zones {
- if [ "$RELOAD" = 1 ]; then
+ if [ "$UPDATE_RELOAD" = 1 ]; then
log_force "Reload zones"
- elif [ "$RELOAD" = 0 ]; then
+ elif [ "$UPDATE_RELOAD" = 0 ]; then
log_noop "Skip reload zones"
return