Handle hostnames with upper-case letters
[webmin.git] / net / backup_config.pl
1
2 do 'net-lib.pl';
3
4 # backup_config_files()
5 # Returns files and directories that can be backed up
6 sub backup_config_files
7 {
8 local @rv = ( $config{'hosts_file'} );
9 if ($config{'ipnodes_file'}) {
10         push(@rv, $config{'ipnodes_file'});
11         }
12 local $dns = &get_dns_config();
13 push(@rv, @{$dns->{'files'}});
14 if (defined(&routing_config_files)) {
15         push(@rv, &routing_config_files());
16         }
17 if (defined(&network_config_files)) {
18         push(@rv, &network_config_files());
19         }
20 push(@rv, map { $_->{'file'} } &boot_interfaces());
21 return &unique(@rv);
22 }
23
24 # pre_backup(&files)
25 # Called before the files are actually read
26 sub pre_backup
27 {
28 return undef;
29 }
30
31 # post_backup(&files)
32 # Called after the files are actually read
33 sub post_backup
34 {
35 return undef;
36 }
37
38 # pre_restore(&files)
39 # Called before the files are restored from a backup
40 sub pre_restore
41 {
42 return undef;
43 }
44
45 # post_restore(&files)
46 # Called after the files are restored from a backup
47 sub post_restore
48 {
49 if (defined(&apply_network)) {
50         &apply_network();
51         }
52 return undef;
53 }
54
55 1;
56