Handle hostnames with upper-case letters
[webmin.git] / bind8 / refetch.cgi
1 #!/usr/local/bin/perl
2 # Re-download the root zone servers
3
4 require './bind8-lib.pl';
5 &error_setup($text{'refetch_err'});
6 &ReadParse();
7
8 # Work out the filename
9 $zone = &get_zone_name($in{'index'}, $in{'view'});
10 &can_edit_zone($zone, $view) ||
11         &error($text{'hint_ecannot'});
12 $file = $zone->{'file'};
13 $rootfile = &make_chroot(&absolute_path($file));
14
15 # Try to download the root servers file from
16 # ftp://rs.internic.net/domain/named.root
17 &lock_file($rootfile);
18 $err = &download_root_zone(&absolute_path($file));
19 &error($err) if ($err);
20 &unlock_file($rootfile);
21
22 &webmin_log("refetch");
23 &redirect("");
24