lib/update.operations: update_domain_forward/reverse: use --add-origin, unless hosts name does not include a .
--- a/lib/update.operations Thu Dec 19 18:55:53 2013 +0200
+++ b/lib/update.operations Thu Dec 19 20:47:43 2013 +0200
@@ -59,12 +59,19 @@
local domain="$1"; shift
local src="$1"; shift
+ local origin_opts=
+
+ if [[ "$domain" == *.* ]]; then
+ origin_opts="--add-origin"
+ fi
+
if check_update "$out" "$src" "$@"; then
log_update "Generating forward hosts zone $out <- $src..."
do_update "$out" $OPT/bin/pvl.hosts-dns \
--hosts-charset=$CHARSET \
--forward-zone="$domain" \
+ $origin_opts \
"$src" "$@"
else
@@ -101,6 +108,7 @@
do_update "$out" $OPT/bin/pvl.hosts-dns \
--hosts-charset=$CHARSET \
--reverse-zone="$reverse" \
+ --add-origin \
"$src" "$@"
else