From 4654ea566a4f2e63844751abc4223229329fe0cd Mon Sep 17 00:00:00 2001 From: sever-sever Date: Wed, 29 Jul 2020 09:33:34 +0000 Subject: firewall: T1241: Check file before del --- scripts/firewall/vyatta-firewall.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/firewall/vyatta-firewall.pl b/scripts/firewall/vyatta-firewall.pl index dc7c702..e6fa85a 100755 --- a/scripts/firewall/vyatta-firewall.pl +++ b/scripts/firewall/vyatta-firewall.pl @@ -293,7 +293,7 @@ sub write_refcnt_file { print $FILE join("\n", @lines), "\n"; close($FILE); } else { - system("rm $refcnt_file"); + unlink($refcnt_file) if -e $refcnt_file; } } -- cgit v1.2.3