equal
deleted
inserted
replaced
11 use File::Find; |
11 use File::Find; |
12 use Carp; |
12 use Carp; |
13 use Pod::Usage; |
13 use Pod::Usage; |
14 use Const::Fast; |
14 use Const::Fast; |
15 use if $ENV{DEBUG} => 'Smart::Comments'; |
15 use if $ENV{DEBUG} => 'Smart::Comments'; |
|
16 use if $^V > v5.14 => (experimental => qw/smartmatch lexical_topic/); |
16 |
17 |
17 const my $NAME => 'AMANDA-CLIENT'; |
18 const my $NAME => 'AMANDA-CLIENT'; |
18 const my $USER => 'backup'; |
19 const my $USER => 'backup'; |
19 const my $CFDIR => '/etc/amanda'; |
20 const my $CFDIR => '/etc/amanda'; |
20 |
21 |
154 my $msg = |
155 my $msg = |
155 sprintf "need: 0%04o root:%s, got: 0%04o %s:%s\n", |
156 sprintf "need: 0%04o root:%s, got: 0%04o %s:%s\n", |
156 $mode, $group, $f_mode, $f_owner, $f_group; |
157 $mode, $group, $f_mode, $f_owner, $f_group; |
157 |
158 |
158 if (-f '/etc/debian_version') { |
159 if (-f '/etc/debian_version') { |
159 $msg .= sprintf "try dpkg-statoverride --update --add root %sgroup 0%04o %s\n", |
160 $msg .= sprintf "try dpkg-statoverride --update --add root %s 0%04o %s\n", |
160 $group, $mode, $file; |
161 $group, $mode, $file; |
161 } |
162 } |
162 |
163 |
163 die $msg unless $f_owner eq $owner; |
164 die $msg unless $f_owner eq $owner; |
164 die $msg unless $f_group eq $group; |
165 die $msg unless $f_group eq $group; |