diff options
author | sever-sever <v.gletenko@vyos.io> | 2020-07-29 09:33:34 +0000 |
---|---|---|
committer | sever-sever <v.gletenko@vyos.io> | 2020-07-29 10:00:52 +0000 |
commit | 928722075e75859c7fdd646f7dc93bfcb0008f9a (patch) | |
tree | 958770668deb4f5a2fc4b17989ada82a0210da76 | |
parent | 90d05171ce6d01a98152982133ad14dadd61e7a3 (diff) | |
download | vyatta-cfg-firewall-928722075e75859c7fdd646f7dc93bfcb0008f9a.tar.gz vyatta-cfg-firewall-928722075e75859c7fdd646f7dc93bfcb0008f9a.zip |
firewall: T1241: Check file before del
-rwxr-xr-x | scripts/firewall/vyatta-firewall.pl | 2 |
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; } } |