make.sh 1.28 KB
Newer Older
hark's avatar
hark committed
1 2
#!/bin/bash 
#set -e
hark's avatar
hark committed
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
. paths.sh

  make_zone () {
    # 1 hostfile.irl
    # 2 irl.020
    # 3 10.205.12:255.255.0.0 (don't put leading 0's in subnet)
    # 4
    hostfile=$1
    zone_name=$2
    subnet=$3

    mkdir $OUT/$zone_name
    cd $OUT/$zone_name && rm *

    $BIN/h2n -d $zone_name \
           -m 10:mail.$zone_name \
           -n $subnet      \
           -h 10.205.253.1   \
           -v 8 -y           \
           -s 10.205.253.1   \
hark's avatar
hark committed
23
           -H $HFD/$hostfile    \
hark's avatar
hark committed
24 25 26 27 28 29 30 31 32 33 34 35 36 37
           -u wireless-amsterdam@lists.puscii.nl   \
           -M -t

    shortname="!todo!"
    echo "made: "
    ls -lh $OUT/$zone_name
    echo "   $OUT/$zone_name/db.$shortname"
    echo "   $OUT/$zone_name/db.$shortname"

    cd $OUT

  }

#routers /radios /etc.
hark's avatar
hark committed
38 39 40 41 42
make_zone hostfile.amsw amsw.020 10.205.252:255.255.255.0
make_zone hostfile.routers routers.020 10.205.253:255.255.255.0
make_zone hostfile.transfernet transfernet.020 10.205.255:255.255.255.0
#is same subnet as transfernet
#make_zone hostfile.radio radio.020 10.205.255:255.255.255.0
hark's avatar
hark committed
43 44 45 46 47 48 49



#
# irl.squesh.net zone
# 

hark's avatar
hark committed
50
make_zone hostfile.irl irl.020 10.205.12:255.255.255.0:
hark's avatar
hark committed
51 52 53 54 55 56 57
make_zone hostfile.irl irl.squesh.net 10.205.12:255.255.255.0

#ki zone
make_zone hostfile.ki ki.020 10.205.14:255.255.255.0
make_zone hostfile.ki ki.squesh.net 10.205.14:255.255.255.0