Commit 15c0ce09 authored by Franco Fichtner's avatar Franco Fichtner

inc: apply last batch of whitespace cleanups

Also reapply a few after recent merge/rebase action in the CP.
parent 1a3cfae0
<?php <?php
/****h* pfSense/config
* NAME
* config.inc - Functions to manipulate config.xml
* DESCRIPTION
* This include contains various config.xml specific functions.
* HISTORY
* $Id$
******
config.console.inc
Copyright (C) 2004-2010 Scott Ullrich
All rights reserved.
originally part of m0n0wall (http://m0n0.ch/wall) /*
Copyright (C) 2004-2010 Scott Ullrich
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>. Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
All rights reserved. All rights reserved.
...@@ -36,18 +25,17 @@ ...@@ -36,18 +25,17 @@
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE. POSSIBILITY OF SUCH DAMAGE.
pfSense_BUILDER_BINARIES: /sbin/mount /sbin/umount /sbin/halt /sbin/fsck
pfSense_MODULE: config
*/ */
function set_networking_interfaces_ports() { function set_networking_interfaces_ports()
{
global $noreboot; global $noreboot;
global $config; global $config;
global $g; global $g;
global $fp; global $fp;
$yes_no_prompt = '[y|n]? ';
$fp = fopen('php://stdin', 'r'); $fp = fopen('php://stdin', 'r');
$memory = get_memory(); $memory = get_memory();
...@@ -106,7 +94,7 @@ Do you want to set up VLANs first? ...@@ -106,7 +94,7 @@ Do you want to set up VLANs first?
If you are not going to use VLANs, or only for optional interfaces, you should If you are not going to use VLANs, or only for optional interfaces, you should
say no here and use the webConfigurator to configure VLANs later, if required. say no here and use the webConfigurator to configure VLANs later, if required.
Do you want to set up VLANs now [y|n]? Do you want to set up VLANs now ${yes_no_prompt}
EOD; EOD;
if ($auto_assign) { if ($auto_assign) {
...@@ -158,8 +146,8 @@ EOD; ...@@ -158,8 +146,8 @@ EOD;
echo <<<EOD echo <<<EOD
Assigned WAN to : $wanif Assigned WAN to : ${wanif}
Assigned LAN to : $lanif Assigned LAN to : ${lanif}
If you don't like this assignment, If you don't like this assignment,
press any key to go back to manual configuration. press any key to go back to manual configuration.
...@@ -301,7 +289,7 @@ EOD; ...@@ -301,7 +289,7 @@ EOD;
echo <<<EOD echo <<<EOD
Do you want to proceed [y|n]? Do you want to proceed ${yes_no_prompt}
EOD; EOD;
$key = chop(fgets($fp)); $key = chop(fgets($fp));
} }
...@@ -319,7 +307,7 @@ echo <<<EODD ...@@ -319,7 +307,7 @@ echo <<<EODD
You have chosen to remove the LAN interface. You have chosen to remove the LAN interface.
Would you like to remove the LAN IP address and Would you like to remove the LAN IP address and
unload the interface now? [y|n]? unload the interface now ${yes_no_prompt}
EODD; EODD;
if (strcasecmp(chop(fgets($fp)), "y") == 0) { if (strcasecmp(chop(fgets($fp)), "y") == 0) {
...@@ -424,8 +412,9 @@ EODD; ...@@ -424,8 +412,9 @@ EODD;
} }
} }
function autodetect_interface($ifname, $fp) { function autodetect_interface($ifname, $fp)
$iflist_prev = get_interface_list("media"); {
$iflist_prev = get_interface_list('media');
echo <<<EOD echo <<<EOD
Connect the {$ifname} interface now and make sure that the link is up. Connect the {$ifname} interface now and make sure that the link is up.
...@@ -447,16 +436,11 @@ EOD; ...@@ -447,16 +436,11 @@ EOD;
return null; return null;
} }
function interfaces_setup() { function vlan_setup()
{
global $iflist, $config, $g, $fp; global $iflist, $config, $g, $fp;
$iflist = get_interface_list(); $yes_no_prompt = '[y|n]? ';
}
function vlan_setup() {
global $iflist, $config, $g, $fp;
$iflist = get_interface_list(); $iflist = get_interface_list();
...@@ -466,7 +450,7 @@ function vlan_setup() { ...@@ -466,7 +450,7 @@ function vlan_setup() {
WARNING: all existing VLANs will be cleared if you proceed! WARNING: all existing VLANs will be cleared if you proceed!
Do you want to proceed [y|n]? Do you want to proceed ${yes_no_prompt}
EOD; EOD;
if (strcasecmp(chop(fgets($fp)), "y") != 0) if (strcasecmp(chop(fgets($fp)), "y") != 0)
...@@ -525,5 +509,3 @@ EOD; ...@@ -525,5 +509,3 @@ EOD;
$vlanif++; $vlanif++;
} }
} }
?>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment