11 # |
11 # |
12 # update_hosts_forward $out $src |
12 # update_hosts_forward $out $src |
13 function update_hosts_forward { |
13 function update_hosts_forward { |
14 local out="$1" |
14 local out="$1" |
15 local src="$2" |
15 local src="$2" |
16 local srcs=($(list_tree $src)) |
|
17 local msg="$out: Generating forward hosts zone: $src" |
16 local msg="$out: Generating forward hosts zone: $src" |
18 |
17 local include_cache=$(include_cache_path $src) |
19 if apply_check "$out" "${srcs[@]}"; then |
18 local srcs=($(include_cache $include_cache)) |
|
19 |
|
20 if apply_check "$out" ${srcs[@]:-}; then |
20 log_skip "$msg" |
21 log_skip "$msg" |
21 else |
22 else |
22 log_apply "$msg" |
23 log_apply "$msg" |
23 |
24 |
24 apply_cmd "$out" $OPT/bin/pvl.hosts-forward \ |
25 apply_cmd "$out" $OPT/bin/pvl.hosts-forward \ |
25 --hosts-include="$HOSTS_INCLUDE" \ |
26 --hosts-include=$HOSTS_INCLUDE \ |
|
27 --hosts-include-trace=$include_cache \ |
26 "$src" |
28 "$src" |
27 fi |
29 fi |
28 } |
30 } |
29 |
31 |
30 ## Generate reverse zone from hosts hosts using pvl.hosts-reverse |
32 ## Generate reverse zone from hosts hosts using pvl.hosts-reverse |
31 # |
33 # |
32 # update_hosts_reverse $out $src |
34 # update_hosts_reverse $out $src |
33 function update_hosts_reverse { |
35 function update_hosts_reverse { |
34 local out="$1" |
36 local out="$1" |
35 local src="$2" |
37 local src="$2" |
36 local srcs=($(list_tree $src)) |
|
37 local msg="$out: Generating reverse hosts zone: $src" |
38 local msg="$out: Generating reverse hosts zone: $src" |
38 |
39 local include_cache=$(include_cache_path $src) |
39 if apply_check "$out" "${srcs[@]}"; then |
40 local srcs=($(include_cache $include_cache)) |
|
41 |
|
42 if apply_check "$out" ${srcs[@]:-}; then |
40 log_skip "$msg" |
43 log_skip "$msg" |
41 else |
44 else |
42 log_apply "$msg" |
45 log_apply "$msg" |
43 |
46 |
44 apply_cmd "$out" $OPT/bin/pvl.hosts-reverse \ |
47 apply_cmd "$out" $OPT/bin/pvl.hosts-reverse \ |
45 --hosts-include="$HOSTS_INCLUDE" \ |
48 --hosts-include="$HOSTS_INCLUDE" \ |
|
49 --hosts-include-trace=$include_cache \ |
46 "$src" |
50 "$src" |
47 fi |
51 fi |
48 } |
52 } |
49 |
53 |
50 function update_zone_include { |
54 function update_zone_include { |