equal
deleted
inserted
replaced
55 # |
55 # |
56 # update_hosts_forward out/hosts/$hosts $hosts in/hosts/$hosts |
56 # update_hosts_forward out/hosts/$hosts $hosts in/hosts/$hosts |
57 function update_hosts_forward { |
57 function update_hosts_forward { |
58 local out="$1"; shift |
58 local out="$1"; shift |
59 local domain="$1"; shift |
59 local domain="$1"; shift |
60 local src="$1"; shift |
60 |
61 |
61 if check_update "$out" "$@"; then |
62 local origin_opts= |
62 log_update "Generating forward hosts zone $out @ $domain <- $@..." |
63 |
|
64 if [[ "$domain" == *.* ]]; then |
|
65 origin_opts="--add-origin" |
|
66 fi |
|
67 |
|
68 if check_update "$out" "$src" "$@"; then |
|
69 log_update "Generating forward hosts zone $out <- $src..." |
|
70 |
63 |
71 do_update "$out" $OPT/bin/pvl.hosts-dns \ |
64 do_update "$out" $OPT/bin/pvl.hosts-dns \ |
72 --hosts-charset=$CHARSET \ |
65 --hosts-charset=$CHARSET \ |
73 --forward-zone="$domain" \ |
66 --forward-zone="$domain" \ |
74 $origin_opts \ |
67 "$@" |
75 "$src" "$@" |
68 else |
76 |
69 log_skip "Generating forward hosts $out <- $@: not changed" |
77 else |
|
78 log_skip "Generating forward hosts $out <- $src: not changed" |
|
79 fi |
70 fi |
80 } |
71 } |
81 |
72 |
82 function update_hosts_dhcp { |
73 function update_hosts_dhcp { |
83 local out=$1; shift |
74 local out=$1; shift |
98 # |
89 # |
99 # update_hosts_reverse out/hosts/$reverse $reverse in/hosts/$hosts |
90 # update_hosts_reverse out/hosts/$reverse $reverse in/hosts/$hosts |
100 function update_hosts_reverse { |
91 function update_hosts_reverse { |
101 local out="$1"; shift |
92 local out="$1"; shift |
102 local reverse="$1"; shift |
93 local reverse="$1"; shift |
103 local src="$1"; shift |
94 |
104 |
95 if check_update "$out" "$@"; then |
105 if check_update "$out" "$src" "$@"; then |
96 log_update "Generating reverse hosts zone $out <- $@..." |
106 log_update "Generating reverse hosts zone $out <- $src..." |
|
107 |
97 |
108 do_update "$out" $OPT/bin/pvl.hosts-dns \ |
98 do_update "$out" $OPT/bin/pvl.hosts-dns \ |
109 --hosts-charset=$CHARSET \ |
99 --hosts-charset=$CHARSET \ |
110 --reverse-zone="$reverse" \ |
100 --reverse-zone="$reverse" \ |
111 --add-origin \ |
101 "$@" |
112 "$src" "$@" |
102 else |
113 |
103 log_skip "Generating reverse hosts $out <- $@: not changed" |
114 else |
|
115 log_skip "Generating reverse hosts $out <- $src: not changed" |
|
116 fi |
104 fi |
117 } |
105 } |
118 |
106 |
119 ## Update .serial number: |
107 ## Update .serial number: |
120 # |
108 # |