mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-29 01:28:50 +01:00
Tweaks to convert_blacklist()
- Reword an error message to handle both missing file and zero-sized file. - Don't rename file that doesn't exist.
This commit is contained in:
parent
1a968ec734
commit
4559c8b5d0
@ -528,12 +528,13 @@ EOF
|
||||
|
||||
close $blrules;
|
||||
} else {
|
||||
warning_message q(There are interfaces or zones with the 'blacklist' option but the 'blacklist' file is empty) unless @rules;
|
||||
warning_message q(There are interfaces or zones with the 'blacklist' option but the 'blacklist' file is empty or does not exist) unless @rules;
|
||||
}
|
||||
|
||||
if ( -f $fn ) {
|
||||
rename $fn, "$fn.bak";
|
||||
|
||||
progress_message2 "Blacklist file $fn saved in $fn.bak";
|
||||
}
|
||||
|
||||
for my $file ( qw(zones interfaces hosts) ) {
|
||||
remove_blacklist $file;
|
||||
|
Loading…
Reference in New Issue
Block a user