Handle hostnames with upper-case letters
[webmin.git] / vgetty / backup_config.pl
1
2 do 'vgetty-lib.pl';
3 &foreign_require("inittab", "inittab-lib.pl");
4
5 # backup_config_files()
6 # Returns files and directories that can be backed up
7 sub backup_config_files
8 {
9 local @rv = ( $config{'vgetty_config'},
10               $inittab::config{'inittab_file'} );
11 local @conf = &get_config();
12 local $rings = &find_value("rings", \@conf);
13 if ($rings =~ /^\//) {
14         push(@rv, $rings);
15         }
16 local $ans = &find_value("answer_mode", \@conf);
17 if ($ans =~ /^\//) {
18         push(@rv, $ans);
19         }
20 return @rv;
21 }
22
23 # pre_backup(&files)
24 # Called before the files are actually read
25 sub pre_backup
26 {
27 return undef;
28 }
29
30 # post_backup(&files)
31 # Called after the files are actually read
32 sub post_backup
33 {
34 return undef;
35 }
36
37 # pre_restore(&files)
38 # Called before the files are restored from a backup
39 sub pre_restore
40 {
41 return undef;
42 }
43
44 # post_restore(&files)
45 # Called after the files are restored from a backup
46 sub post_restore
47 {
48 return &apply_configuration();
49 }
50
51 1;
52