lib/pvl/hosts/zone.sh
changeset 651 599dc457c590
parent 648 8e3e6be9ac70
child 654 8069b08e90ac
equal deleted inserted replaced
650:c707c3ee8665 651:599dc457c590
    52 function update_zone_include {
    52 function update_zone_include {
    53     local out="$1"
    53     local out="$1"
    54     local src="$2"
    54     local src="$2"
    55     local msg="$out: Copy zone include: $src"
    55     local msg="$out: Copy zone include: $src"
    56 
    56 
    57     if apply_check "$out" "${srcs[@]}"; then
    57     if apply_check "$out" "${@:2}"; then
    58         log_skip "$msg"
    58         log_skip "$msg"
    59     else
    59     else
    60         log_apply "$msg"
    60         log_apply "$msg"
    61 
    61 
    62         apply_cmd "$out" cat \
    62         apply_cmd "$out" cat \
   134 # Sets the SOA serial, and adjusts the $INCLUDE paths
   134 # Sets the SOA serial, and adjusts the $INCLUDE paths
   135 function update_zone {
   135 function update_zone {
   136     local out="$1"
   136     local out="$1"
   137     local src="$2"
   137     local src="$2"
   138     local serial="$3"
   138     local serial="$3"
   139     local includes="$4"
       
   140     local serial_opt=
   139     local serial_opt=
   141     local msg="$out: Generate zone: $src"
   140     local msg="$out: Generate zone: $src"
   142 
   141 
   143     if [ -n "$serial" -a -f "$serial" ]; then
   142     if [ -n "$serial" -a -f "$serial" ]; then
   144         serial_opt="--serial=$(cat "$serial")"
   143         serial_opt="--serial=$(cat "$serial")"
   146         warn "$out: omit noop'd serial"
   145         warn "$out: omit noop'd serial"
   147     else
   146     else
   148         fail "$out: missing serial: $serial"
   147         fail "$out: missing serial: $serial"
   149     fi
   148     fi
   150 
   149 
   151     if apply_check "$@"; then
   150     if apply_check "$out" "${@:2}"; then
   152         log_skip "$msg"
   151         log_skip "$msg"
   153     else
   152     else
   154         log_apply "$msg"
   153         log_apply "$msg"
   155 
   154 
   156         apply_cmd "$out" $OPT/bin/pvl.dns-process \
   155         apply_cmd "$out" $OPT/bin/pvl.dns-process \