From 4aa64f79f030987d9745a3500df95be360b1de64 Mon Sep 17 00:00:00 2001 From: gnhb Date: Fri, 9 Apr 2010 18:16:32 +0700 Subject: Configure interface when changing settings, and fix init string field. The interface configure function is called after "write_config()" because we must write the new data to the config before reading the config to bring up the interface with the new settings. --- usr/local/www/interfaces_ppp_edit.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'usr') diff --git a/usr/local/www/interfaces_ppp_edit.php b/usr/local/www/interfaces_ppp_edit.php index f3aae99..c6a23ec 100644 --- a/usr/local/www/interfaces_ppp_edit.php +++ b/usr/local/www/interfaces_ppp_edit.php @@ -136,19 +136,21 @@ if ($_POST) { unset($ppp['connect-timeout']); $ppp['descr'] = $_POST['descr']; - $iflist = get_configured_interface_list(); foreach ($iflist as $if) { - if ($config['interfaces'][$if]['if'] == basename($a_ppps[$id]['port'])) + if ($config['interfaces'][$if]['if'] == basename($a_ppps[$id]['port'])) { $config['interfaces'][$if]['if'] = basename($ppp['port']); + $thisif = $if; + } } - if (isset($id) && $a_ppps[$id]) $a_ppps[$id] = $ppp; else $a_ppps[] = $ppp; - + write_config(); + if (!empty($thisif)) + interface_ppp_configure($thisif); header("Location: interfaces_ppp.php"); exit; @@ -230,7 +232,7 @@ include("head.inc"); Init String - +
Note: Enter the modem initialization string here. Do NOT include the "AT" string at the beginning of the command. -- cgit v1.1