Handle hostnames with upper-case letters
[webmin.git] / bind8 / save_files.cgi
1 #!/usr/local/bin/perl
2 # save_files.cgi
3 # Save global files options
4
5 require './bind8-lib.pl';
6 $access{'defaults'} || &error($text{'files_ecannot'});
7 &error_setup($text{'files_err'});
8 &ReadParse();
9
10 &lock_file(&make_chroot($config{'named_conf'}));
11 $conf = &get_config();
12 $options = &find("options", $conf);
13 &save_opt("statistics-file", \&file_check, $options, 1);
14 &save_opt("dump-file", \&file_check, $options, 1);
15 &save_opt("pid-file", \&file_check, $options, 1);
16 &save_opt("named-xfer", \&file_check, $options, 1);
17 &flush_file_lines();
18 &unlock_file(&make_chroot($config{'named_conf'}));
19 &webmin_log("files", undef, undef, \%in);
20 &redirect("");
21
22 sub file_check
23 {
24 return $_[0] =~ /\S/ ? '' : $text{'files_efile'};
25 }
26