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 $
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
18 echo "Download failed"
20 gunzip
< ${locfile} > root.zone.new
21 if ( $status == 0 ) then
23 if ( -f root.zone
) then
24 mv -f root.zone root.zone.bak
26 chmod 644 root.zone.new
27 mv -f root.zone.new root.zone
28 echo "Download succeeded, restarting named"
33 echo "Download failed: gunzip returned an error"