# This source code is released into the public domain. # # The named allow_internal.conf file is an ACL definition containing a # list of ";" NAMED_FILE="/usr/local/etc/namedb/allow_internal.conf" NAMED_TEMP="${NAMED_FILE}.ldaptmp" if [ ! -f "$NAMED_FILE" ]; then exit 0 fi printf >"$NAMED_TEMP" 'acl "allow_internal" {\n' awk <"$NETWORKS_FILE" >>"$NAMED_TEMP" '{ print $1 ";" }' printf >>"$NAMED_TEMP" '};\n' if cmp -s "$NAMED_TEMP" "$NAMED_FILE"; then rm "$NAMED_TEMP" exit 0 fi printf '%s updated:\n\n' "$NAMED_FILE" diff "$NAMED_FILE" "$NAMED_TEMP" printf '\n' mv "$NAMED_TEMP" "$NAMED_FILE" /usr/local/sbin/rndc reload