diff options
Diffstat (limited to 'del-syslog')
-rwxr-xr-x | del-syslog | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -32,6 +32,7 @@ sub del_sysklogd_entry { my ($package) = @_; my $file = "/etc/syslog.conf"; + my $content; open(my $in, '<', $file) or die "Can't open $file for reading: $!"; @@ -58,6 +59,9 @@ sub del_rsyslog_entry { my $file = "/etc/rsyslog.d/$package.conf"; + # check the file exists + return unless -f $file; + # check the file is the one created by package installation open(my $in, '<', $file) or die "Can't open $file for reading: $!"; |