Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
6d3eded2
Commit
6d3eded2
authored
Jul 01, 2015
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
config: flush unused $auto_assign code
parent
81161cda
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
74 additions
and
153 deletions
+74
-153
config.console.inc
src/etc/inc/config.console.inc
+74
-153
No files found.
src/etc/inc/config.console.inc
View file @
6d3eded2
...
...
@@ -39,19 +39,13 @@ function set_networking_interfaces_ports()
$iflist
=
get_interface_list
();
/* Function flow is based on $key
and $auto_assign or the lack thereof
*/
/* Function flow is based on $key */
$key
=
null
;
/* Only present auto interface option if running from LiveCD and interface mismatch*/
if
(
is_install_media
()
&&
is_interface_mismatch
())
{
$auto_assign
=
false
;
}
echo
<<<EOD
Valid interfaces are:
EOD;
if
(
!
is_array
(
$iflist
))
{
...
...
@@ -64,15 +58,6 @@ EOD;
}
}
if
(
$auto_assign
)
{
echo
<<<EOD
!!! LiveCD Detected: Auto Interface Option !!!!
BEGIN MANUAL CONFIGURATION OR WE WILL PROCEED WITH AUTO CONFIGURATION.
EOD;
}
echo
<<<EOD
Do you want to set up VLANs first?
...
...
@@ -83,71 +68,8 @@ say no here and use the webConfigurator to configure VLANs later, if required.
Do you want to set up VLANs now ${yes_no_prompt}
EOD;
if
(
$auto_assign
)
{
$key
=
timeout
();
}
else
$key
=
chop
(
fgets
(
$fp
));
if
(
!
isset
(
$key
)
and
$auto_assign
)
{
// Auto Assign Interfaces
do
{
echo
<<<EOD
!!! Auto Assigning Interfaces !!!
For installation purposes, you must plug in at least one NIC
for the LAN connection. If you plug in a second NIC it will be
assigned to WAN. Otherwise, we'll temporarily assign WAN to the
next available NIC found regardless of activity. You should
assign and configure the WAN interface according to your requirements
If you haven't plugged in any network cables yet,
now is the time to do so.
We'll keep trying until you do.
Searching for active interfaces...
EOD;
unset
(
$wanif
,
$lanif
);
$media_iflist
=
$plugged_in
=
array
();
$media_iflist
=
get_interface_list
(
"media"
);
foreach
(
$media_iflist
as
$iface
=>
$ifa
)
{
if
(
$ifa
[
'up'
])
$plugged_in
[]
=
$iface
;
}
$lanif
=
array_shift
(
$plugged_in
);
$wanif
=
array_shift
(
$plugged_in
);
if
(
isset
(
$lanif
)
&&
!
isset
(
$wanif
))
{
foreach
(
$iflist
as
$iface
=>
$ifa
)
{
if
(
$iface
!=
$lanif
)
{
$wanif
=
$iface
;
break
;
}
}
}
echo
<<<EOD
Assigned WAN to : ${wanif}
Assigned LAN to : ${lanif}
If you don't like this assignment,
press any key to go back to manual configuration.
EOD;
$key
=
timeout
(
20
);
if
(
isset
(
$key
))
return
;
}
while
(
!
isset
(
$wanif
));
$config
[
'system'
][
'ssh'
][
'enabled'
]
=
'enabled'
;
$key
=
'y'
;
}
else
{
//Manually assign interfaces
if
(
in_array
(
$key
,
array
(
'y'
,
'Y'
)))
vlan_setup
();
...
...
@@ -245,7 +167,6 @@ EOD;
break
;
}
}
}
/* check for double assignments */
$ifarr
=
array_merge
(
array
(
$lanif
,
$wanif
),
$optif
);
...
...
@@ -286,7 +207,7 @@ EOD;
$config
[
'interfaces'
][
'lan'
]
=
array
();
$config
[
'interfaces'
][
'lan'
][
'if'
]
=
$lanif
;
$config
[
'interfaces'
][
'lan'
][
'enable'
]
=
true
;
}
elseif
(
!
file_exists
(
"/var/run/booting"
)
&&
!
$auto_assign
)
{
}
elseif
(
!
file_exists
(
"/var/run/booting"
))
{
echo
<<<EODD
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment