Professional Documents
Culture Documents
The ParseExtract.sh script was written to run in Linux and uses the BIND utility named-checkzone to validate the
generated BIND formatted file. This script can be modified to run into the OS and DNS system you have.
#!/bin/bash
#########################################################
# Copyright: 2019 by Oracle America,
Inc. All Rights Reserved.
# Purpose: Parses Oracle Cloud at
customer DNS extract file
# File: ParseExtract.sh
# Usage: ParseExtract.sh [ Input file ]
[ Domain ] [ Controldns1 ] \
# [ Controldns2 ] [ Output prefix ]
#
#########################################################
UPDATE_DATE='19-JUN-2019'
VERSION="1.0"
ECHO="/bin/echo -e "
DATE='date +%m%d%Y'
INPUTFILE=$1
DOMAIN=$2
DNSIP1=$3
DNSIP2=$4
PREFIX=$5
CHECKZONE=/usr/sbin/named-checkzone
version() {
$ECHO
$ECHO "Cloud at customer DNS Extract to
BIND Converter"
$ECHO "Copyright Oracle, Inc 2019"
$ECHO "Version $VERSION Dated
$UPDATE_DATE"
$ECHO
}
#########################################################
# usage_function ()
#########################################################
usage_function () {
$ECHO " Usage: 'basename $0' [ Input
file ] [ Domain ] [ Controldns1 ] [
Controldns2 ] [ Output prefix ] "
$ECHO " "
$ECHO " Input file : The OCC DNS
extract file from Oracle Support."
$ECHO " Domain : The name of the Cloud
at Customer Domain. "
$ECHO "Controldns1 Controldns2 : The IP
addresses of the Control DNS."
$ECHO " Output prefix : A name to be
prepended to the file _BIND_$2_$DATE.db
"
$ECHO " "
$ECHO "Example: 'basename $0' occ-
dns_export.conf