From acf23e63aceb182a748f1f618bf87957747d7886 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Thu, 20 Aug 2009 16:33:09 -0400 Subject: Only remove tmp file if we succeed --- usr/local/www/diag_showbogons.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr/local/www/diag_showbogons.php') diff --git a/usr/local/www/diag_showbogons.php b/usr/local/www/diag_showbogons.php index 4f75c70..f5f8fc1 100644 --- a/usr/local/www/diag_showbogons.php +++ b/usr/local/www/diag_showbogons.php @@ -43,8 +43,8 @@ if($_POST['Download']) { if(file_exists("/tmp/bogons")) { $savemsg = "The bogons database has been updated."; exec("egrep -v '^192.168.0.0/16|^172.16.0.0/12|^10.0.0.0/8' /tmp/bogons > /etc/bogons"); + exec("rm /tmp/bogons"); } - exec("rm /tmp/bogons"); } $bogons = `cat /etc/bogons`; -- cgit v1.1