15 |
15 |
16 customer="$1"; shift |
16 customer="$1"; shift |
17 start=$(date -I) |
17 start=$(date -I) |
18 |
18 |
19 # config |
19 # config |
|
20 source dnstools.conf |
20 |
21 |
21 secondary=hh.schlittermann.de |
22 secondary=$SECONDARY |
22 this_host=ns1.eins.lan #${this_host=$(hostname -f)} |
23 secondary_ip=${secondary_ip=$(dig +short $secondary)} |
23 this_ip=192.168.0.1 #${this_ip=$(hostname -i)} |
24 |
24 this_domain=eins.lan #${this_domain=$(hostname -d)} |
25 this_host=${THIS_HOST:-$(hostname -f)} |
|
26 this_ip=${THIS_IP:-$(hostname -i)} |
|
27 this_domain=${THIS_DOMAIN:-$(hostname -d)} |
|
28 primary=${PRIMARY:-$this_host} |
25 |
29 |
26 hostmaster=${hostmaster="hostmaster.$this_domain"} |
30 hostmaster=${hostmaster="hostmaster.$this_domain"} |
27 |
31 |
28 primary_dir=${primary_dir=/etc/bind/zones.d} |
32 primary_dir=${primary_dir=/etc/bind/zones.d} |
29 master_dir=${master_dir=/etc/bind/master} |
33 master_dir=${master_dir=/etc/bind/master} |
30 |
34 |
31 test -d $primary_dir || mkdir $primary_dir |
35 test -d $primary_dir || mkdir $primary_dir |
32 test -d $master_dir || mkdir $master_dir |
36 test -d $master_dir || mkdir $master_dir |
33 |
37 |
34 secondary=${secondary?} |
|
35 secondary_ip=${secondary_ip=$(dig +short $secondary)} |
|
36 |
38 |
37 # debug option |
39 # debug option |
38 if test $opt_debug; then |
40 if test $opt_debug; then |
39 cat <<xxx |
41 cat <<xxx |
40 this host: $this_host [$this_ip] |
42 this host: $this_host [$this_ip] |
41 this domain: $this_domain |
43 this domain: $this_domain |
|
44 primary: $primary |
42 secondary: $secondary [$secondary_ip] |
45 secondary: $secondary [$secondary_ip] |
43 hostmaster: $hostmaster |
46 hostmaster: $hostmaster |
44 primary directory: $primary_dir |
47 primary directory: $primary_dir |
45 xxx |
48 xxx |
46 exit |
49 exit |