From da3ee8238aed3da265d9169d22debe27033fd327 Mon Sep 17 00:00:00 2001 From: Ermal Date: Mon, 4 Oct 2010 13:13:10 +0000 Subject: [PATCH] Do not use mwexec when unlink can be used and is faster. This also avoids errors on log from rm(1). --- etc/inc/filter.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index 80e1d46f43..c3b0d65d40 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -1328,9 +1328,9 @@ function filter_nat_rules_generate() { /* XXX: FIX ME! IPV6 */ $natrules .= "rdr on \${$FilterIflist['wan']['descr']} proto ipv6 from any to any -> {$config['diag']['ipv6nat']['ipaddr']}\n"; } + if(file_exists("/var/etc/inetd.conf")) - mwexec("rm /var/etc/inetd.conf"); - touch("/var/etc/inetd.conf"); + @unlink("/var/etc/inetd.conf"); // Open inetd.conf write handle $inetd_fd = fopen("/var/etc/inetd.conf","w"); /* add tftp protocol helper */