Handle hostnames with upper-case letters
[webmin.git] / fetchmail / backup_config.pl
1
2 do 'fetchmail-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;
9 if ($config{'config_file'}) {
10         push(@rv, $config{'config_file'});
11         }
12 else {
13         setpwent();
14         while(@uinfo = getpwent()) {
15                 local $path = "$uinfo[7]/.fetchmailrc";
16                 push(@rv, $path) if (-r $path);
17                 }
18         endpwent() if ($gconfig{'os_type'} ne 'hpux');
19         }
20 return &unique(@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 undef;
49 }
50
51 1;
52