diff options
author | jim-p <jimp@pfsense.org> | 2011-05-06 15:36:16 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2011-05-06 15:36:16 -0400 |
commit | 6f5ed6f028af5ba5f142620e7770e1138a1b1d01 (patch) | |
tree | 4d9c00b109f34c2b696db814e95630886ddb1b8d | |
parent | f02c3e1de372cc1d08c6690305de934d2304ef27 (diff) | |
download | pfsense-6f5ed6f028af5ba5f142620e7770e1138a1b1d01.zip pfsense-6f5ed6f028af5ba5f142620e7770e1138a1b1d01.tar.gz |
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.
-rw-r--r-- | etc/inc/filter.inc | 17 |
1 files changed, 9 insertions, 8 deletions
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; } |