Changeset 1299

Show
Ignore:
Timestamp:
06/02/04 19:42:11 (5 years ago)
Author:
anonymous
Message:

- ajout du param�tre MASTERIP
- ajout du postrm qui d�sinstalle de named.conf

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/slavedns

    r1298 r1299  
    1010function CreateBindConf { 
    1111    CFILE="$1" 
    12     MASTER="$2" 
    1312    rm -f ${BINDDIR}/${CFILE} 
    1413    cat ${CACHEDIR}/${CFILE} | (read A; while [ "$A" ];  # Treat each domain one by one. 
    1514          do  
    16           echo "zone \"$A\" { type slave; allow-query { any; }; file \"$A\"; masters { $MASTER; }; };" >>${BINDDIR}/${CFILE} 
     15          echo "zone \"$A\" { type slave; allow-query { any; }; file \"$A\"; masters { $MASTERIP; }; };" >>${BINDDIR}/${CFILE} 
    1716          read A 
    1817          done) 
     
    3130for i in `ls * | grep -v slavedns.conf | grep -v '~$' ` 
    3231  do 
    33   # HOST LOGIN PASSWORD  
     32  # HOST LOGIN PASSWORD MASTERIP 
    3433  HOST="" 
     34  MASTERIP="" 
    3535  LOGIN="" 
    3636  PASSWORD="" 
    3737  SSL="" 
    3838  . $i 
    39   if [ -z "$HOST" -o -z "$LOGIN" -o -z "$PASSWORD"
     39  if [ -z "$HOST" -o -z "$LOGIN" -o -z "$PASSWORD" -o -z "$MASTERIP"
    4040      then 
    4141      echo "Error in the config file '$i'" 
     
    6161              cp -f ${CACHEDIR}/${i}.temp ${CACHEDIR}/${i} 
    6262              # Now parse the slave file and send it to /etc/bind/slavedns 
    63               CreateBindConf ${i} ${HOST} 
     63              CreateBindConf ${i}  
    6464              RELOAD="YES" 
    6565              fi 
  • trunk/slavedns.conf

    r1298 r1299  
    55# Each file contains shell variables and shell syntax must be correct. 
    66 
    7 # Hostname of the master dns server :  
     7# Hostname http[s] of the master dns server :  
    88HOST=primary.example.com 
     9 
     10# IP Address of the master dns server :  
     11HOST=10.0.0.1 
    912 
    1013# Login of the slave to connect to the server (the primary dns administrator will give it to you.)