summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsever-sever <v.gletenko@vyos.io>2020-07-29 09:33:34 +0000
committerDaniil Baturin <daniil@vyos.io>2020-07-29 13:17:21 +0300
commit4654ea566a4f2e63844751abc4223229329fe0cd (patch)
tree3df5247e7c44f485dcc5254f0ac6ad0b1442393e
parent3bf42fb42c39533ec73800609d5518728c75992a (diff)
downloadvyatta-cfg-firewall-4654ea566a4f2e63844751abc4223229329fe0cd.tar.gz
vyatta-cfg-firewall-4654ea566a4f2e63844751abc4223229329fe0cd.zip
firewall: T1241: Check file before del
-rwxr-xr-xscripts/firewall/vyatta-firewall.pl2
1 files changed, 1 insertions, 1 deletions
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;
}
}