diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2006-09-28 20:37:51 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2006-09-28 20:37:51 +0000 |
commit | 65f93be9684e1ed94c96f3ba65eea6ee83b91c69 (patch) | |
tree | ccf9c13539feae3f60bfc6591763062e96b9837c | |
parent | 1dcca0966829c1f434b891788f2ae88b572d5afa (diff) | |
download | pfsense-packages-65f93be9684e1ed94c96f3ba65eea6ee83b91c69.tar.gz pfsense-packages-65f93be9684e1ed94c96f3ba65eea6ee83b91c69.tar.bz2 pfsense-packages-65f93be9684e1ed94c96f3ba65eea6ee83b91c69.zip |
Allow items to be saved via $_POST or from config.xml.
This is needed if you call sync_package_miniupnpd() from outside of the normal coregui post sequence
-rw-r--r-- | packages/miniupnpd/miniupnpd.inc | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/packages/miniupnpd/miniupnpd.inc b/packages/miniupnpd/miniupnpd.inc index 933e58cb..47736018 100644 --- a/packages/miniupnpd/miniupnpd.inc +++ b/packages/miniupnpd/miniupnpd.inc @@ -10,7 +10,18 @@ $ifaces_final = ""; $first = 0; $wanif = get_real_wan_interface(); - if(is_array($_POST['interface_array'])) { + + if($_POST['overridewanip']) + $overridewanip = $_POST['overridewanip']; + else if($config['installedpackages']['miniupnpd']['config'][0]['overridewanip']) + $overridewanip = $config['installedpackages']['miniupnpd']['config'][0]['overridewanip']; + + if(is_array($_POST['interface_array'])) + $interface_array = $_POST['interface_array']; + else if($config['installedpackages']['miniupnpd']['config'][0]['interface_array']) + $interface_array = $config['installedpackages']['miniupnpd']['config'][0]['interface_array']; + + if($interface_array) { foreach($_POST['interface_array'] as $iface) { $if = convert_friendly_interface_to_real_interface_name($iface); if($if) { @@ -29,7 +40,7 @@ $start .= "/usr/local/sbin/miniupnpd -p 2869{$ifaces_final}"; /* override wan ip address, common for carp, etc */ - if($_POST['overridewanip']) + if($overridewanip) $start .= " -o {$overridewanip}"; $stop .= "/usr/bin/killall miniupnpd \n"; |