# HG changeset patch # User Heiko Schlittermann # Date 1277798084 -7200 # Node ID 9cad6f1c5505e48741134b5a4188c9ae31cefaca # Parent 920c1a51ba0e9a63efd2661b62649833cf1979d9 Added config file. Primary is extra config item now. diff -r 920c1a51ba0e -r 9cad6f1c5505 dnstools.conf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dnstools.conf Tue Jun 29 09:54:44 2010 +0200 @@ -0,0 +1,6 @@ +SECONDARY=hh.schlittermann.de +PRIMARY=pu.schlittermann.de +THIS_HOST= +THIS_IP= +THIS_DOMAIN= + diff -r 920c1a51ba0e -r 9cad6f1c5505 mkdomain --- a/mkdomain Mon Jun 28 18:02:04 2010 +0200 +++ b/mkdomain Tue Jun 29 09:54:44 2010 +0200 @@ -17,11 +17,15 @@ start=$(date -I) # config +source dnstools.conf -secondary=hh.schlittermann.de -this_host=ns1.eins.lan #${this_host=$(hostname -f)} -this_ip=192.168.0.1 #${this_ip=$(hostname -i)} -this_domain=eins.lan #${this_domain=$(hostname -d)} +secondary=$SECONDARY +secondary_ip=${secondary_ip=$(dig +short $secondary)} + +this_host=${THIS_HOST:-$(hostname -f)} +this_ip=${THIS_IP:-$(hostname -i)} +this_domain=${THIS_DOMAIN:-$(hostname -d)} +primary=${PRIMARY:-$this_host} hostmaster=${hostmaster="hostmaster.$this_domain"} @@ -31,14 +35,13 @@ test -d $primary_dir || mkdir $primary_dir test -d $master_dir || mkdir $master_dir -secondary=${secondary?} -secondary_ip=${secondary_ip=$(dig +short $secondary)} # debug option if test $opt_debug; then cat <