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
/****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>.
All rights reserved.
......@@ -36,18 +25,17 @@
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
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 $config;
global $g;
global $fp;
$yes_no_prompt = '[y|n]? ';
$fp = fopen('php://stdin', 'r');
$memory = get_memory();
......@@ -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
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;
if ($auto_assign) {
......@@ -158,8 +146,8 @@ EOD;
echo <<<EOD
Assigned WAN to : $wanif
Assigned LAN to : $lanif
Assigned WAN to : ${wanif}
Assigned LAN to : ${lanif}
If you don't like this assignment,
press any key to go back to manual configuration.
......@@ -301,7 +289,7 @@ EOD;
echo <<<EOD
Do you want to proceed [y|n]?
Do you want to proceed ${yes_no_prompt}
EOD;
$key = chop(fgets($fp));
}
......@@ -319,7 +307,7 @@ echo <<<EODD
You have chosen to remove the LAN interface.
Would you like to remove the LAN IP address and
unload the interface now? [y|n]?
unload the interface now ${yes_no_prompt}
EODD;
if (strcasecmp(chop(fgets($fp)), "y") == 0) {
......@@ -424,8 +412,9 @@ EODD;
}
}
function autodetect_interface($ifname, $fp) {
$iflist_prev = get_interface_list("media");
function autodetect_interface($ifname, $fp)
{
$iflist_prev = get_interface_list('media');
echo <<<EOD
Connect the {$ifname} interface now and make sure that the link is up.
......@@ -447,16 +436,11 @@ EOD;
return null;
}
function interfaces_setup() {
function vlan_setup()
{
global $iflist, $config, $g, $fp;
$iflist = get_interface_list();
}
function vlan_setup() {
global $iflist, $config, $g, $fp;
$yes_no_prompt = '[y|n]? ';
$iflist = get_interface_list();
......@@ -466,7 +450,7 @@ function vlan_setup() {
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;
if (strcasecmp(chop(fgets($fp)), "y") != 0)
......@@ -525,5 +509,3 @@ EOD;
$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