summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsever-sever <v.gletenko@vyos.io>2020-07-29 09:33:34 +0000
committersever-sever <v.gletenko@vyos.io>2020-07-29 10:00:52 +0000
commit928722075e75859c7fdd646f7dc93bfcb0008f9a (patch)
tree958770668deb4f5a2fc4b17989ada82a0210da76
parent90d05171ce6d01a98152982133ad14dadd61e7a3 (diff)
downloadvyatta-cfg-firewall-928722075e75859c7fdd646f7dc93bfcb0008f9a.tar.gz
vyatta-cfg-firewall-928722075e75859c7fdd646f7dc93bfcb0008f9a.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;
}
}