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
5ddbfd16
Commit
5ddbfd16
authored
Jul 01, 2015
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
config: straighten out the wan/lan assign code a little
parent
679b72f3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
config.console.inc
src/etc/inc/config.console.inc
+10
-8
No files found.
src/etc/inc/config.console.inc
View file @
5ddbfd16
...
...
@@ -106,21 +106,21 @@ EOD;
do
{
echo
"
\n
"
.
gettext
(
"Enter the WAN interface name or 'a' for auto-detection:"
)
.
" "
;
if
(
$interactive
)
{
$wanif
=
chop
(
fgets
(
$fp
));
}
else
{
$wanif
=
$ifnames
[
0
];
echo
$wanif
.
PHP_EOL
;
}
if
(
$wanif
==
''
)
{
return
;
}
if
(
$wanif
==
'a'
)
{
$wanif
=
autodetect_interface
(
'WAN'
,
$fp
);
}
elseif
(
!
array_key_exists
(
$wanif
,
$iflist
))
{
printf
(
gettext
(
"%sInvalid interface name '%s'%s"
),
"
\n
"
,
$wanif
,
"
\n
"
);
}
if
(
!
array_key_exists
(
$wanif
,
$iflist
))
{
printf
(
"
\n
"
.
gettext
(
"Invalid interface name '%s'"
)
.
"
\n
"
,
$wanif
);
unset
(
$wanif
);
continue
;
}
}
while
(
!
$wanif
);
...
...
@@ -139,12 +139,14 @@ EOD;
if
(
$lanif
==
''
)
{
break
;
}
if
(
$lanif
==
'a'
)
{
$lanif
=
autodetect_interface
(
'LAN'
,
$fp
);
}
elseif
(
!
array_key_exists
(
$lanif
,
$iflist
))
{
}
if
(
!
array_key_exists
(
$lanif
,
$iflist
))
{
printf
(
gettext
(
"%sInvalid interface name '%s'%s"
),
"
\n
"
,
$lanif
,
"
\n
"
);
unset
(
$lanif
);
continue
;
}
}
while
(
!
$lanif
);
...
...
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