From 6f5ed6f028af5ba5f142620e7770e1138a1b1d01 Mon Sep 17 00:00:00 2001 From: jim-p Date: Fri, 6 May 2011 15:36:16 -0400 Subject: Reorder where inetd gets started to after where the package rules are generated, so that a package can add a line to inetd.conf using that process. --- etc/inc/filter.inc | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'etc') diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index 90a787c..b11ee3a 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -1537,14 +1537,6 @@ function filter_nat_rules_generate() { } } fclose($inetd_fd); // Close file handle - // Check if inetd is running, if not start it. If so, restart it gracefully. - $helpers = isvalidproc("inetd"); - if(file_exists("/var/etc/inetd.conf")) { - if(!$helpers) - mwexec("/usr/sbin/inetd -wW -R 0 -a 127.0.0.1 /var/etc/inetd.conf"); - else - sigkillbypid("/var/run/inetd.pid", "HUP"); - } if (isset($config['pptpd']['mode']) && ($config['pptpd']['mode'] != "off")) { if ($config['pptpd']['mode'] == "redir") { @@ -1564,6 +1556,15 @@ function filter_nat_rules_generate() { if(!empty($reflection_txt)) $natrules .= "\n# Reflection redirects and NAT for 1:1 mappings\n" . $reflection_txt; + // Check if inetd is running, if not start it. If so, restart it gracefully. + $helpers = isvalidproc("inetd"); + if(file_exists("/var/etc/inetd.conf")) { + if(!$helpers) + mwexec("/usr/sbin/inetd -wW -R 0 -a 127.0.0.1 /var/etc/inetd.conf"); + else + sigkillbypid("/var/run/inetd.pid", "HUP"); + } + return $natrules; } -- cgit v1.1