make.sh 1.19 KB
Newer Older
hark's avatar
hark committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
#!/bin/bash

. 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   \
           -H $HFD/hostfile.irl    \
           -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.
make_zone hostfile.amsw amsw.020 10.205.252
make_zone hostfile.routers routers.020 10.205.253
make_zone hostfile.transfernet transfernet.020 10.205.254
make_zone hostfile.radio radio.020 10.205.255



#
# irl.squesh.net zone
# 

make_zone hostfile.irl irl.020 10.205.12:255.255.255.0
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