A cvsup file that pulls the "checked out" version of source. I'm referencing
[dragonfly.git] / etc / namedb / getroot
blobf2e7e22e7bb42accc4bf6976941e0016289fb33b
1 #!/bin/tcsh -f
3 # If you are running named and using root.zone as a master, the root.zone
4 # file should be updated periodicly from ftp.rs.internic.net.
6 # $DragonFly: src/etc/namedb/getroot,v 1.1 2004/05/27 18:15:40 dillon Exp $
8 umask 027
10 set hostname = 'ftp.rs.internic.net'
11 set remfile = domain/root.zone.gz
12 set locfile = root.zone.gz
13 set path = ( /bin /usr/bin /sbin /usr/sbin )
15 fetch ftp://${hostname}:/${remfile}
16 if ( $status != 0) then
17 rm -f ${locfile}
18 echo "Download failed"
19 else
20 gunzip < ${locfile} > root.zone.new
21 if ( $status == 0 ) then
22 rm -f ${locfile}
23 if ( -f root.zone ) then
24 mv -f root.zone root.zone.bak
25 endif
26 chmod 644 root.zone.new
27 mv -f root.zone.new root.zone
28 echo "Download succeeded, restarting named"
29 rndc reload
30 sleep 1
31 rndc status
32 else
33 echo "Download failed: gunzip returned an error"
34 rm -f ${locfile}
35 endif
36 endif