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
0ace3542
Commit
0ace3542
authored
May 11, 2017
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rc: more tweaks
parent
b5505cb4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
13 deletions
+11
-13
rc.initial.setlanip
src/etc/rc.initial.setlanip
+11
-13
No files found.
src/etc/rc.initial.setlanip
View file @
0ace3542
...
...
@@ -248,7 +248,7 @@ function console_configure_ip_address($version)
$upperifname
=
strtoupper
(
$interface
);
if
(
console_prompt_for_yn
(
sprintf
(
'Configure %s address %s interface via %s?'
,
$label_IPvX
,
$upperifname
,
$label_DHCP
),
'y
'
))
{
if
(
console_prompt_for_yn
(
sprintf
(
'Configure %s address %s interface via %s?'
,
$label_IPvX
,
$upperifname
,
$label_DHCP
),
$interface
==
'wan'
?
'y'
:
'n
'
))
{
$ifppp
=
console_get_interface_from_ppp
(
get_real_interface
(
$interface
));
if
(
!
empty
(
$ifppp
))
{
$ifaceassigned
=
$ifppp
;
...
...
@@ -262,11 +262,7 @@ function console_configure_ip_address($version)
if
(
!
$isintdhcp
)
{
while
(
true
)
{
do
{
echo
"
\n
"
.
sprintf
(
'Enter the new %s %s address. Press <ENTER> for none:'
,
$upperifname
,
$label_IPvX
)
.
"
\n
> "
;
echo
"
\n
"
.
sprintf
(
'Enter the new %s %s address. Press <ENTER> for none:'
,
$upperifname
,
$label_IPvX
)
.
"
\n
> "
;
$intip
=
chop
(
fgets
(
$fp
));
$is_ipaddr
=
(
$version
===
6
)
?
is_ipaddrv6
(
$intip
)
:
is_ipaddrv4
(
$intip
);
if
(
$is_ipaddr
&&
is_ipaddr_configured
(
$intip
,
$interface
))
{
...
...
@@ -276,6 +272,7 @@ function console_configure_ip_address($version)
$ip_conflict
=
false
;
}
}
while
((
$ip_conflict
===
true
)
||
!
(
$is_ipaddr
||
$intip
==
''
));
echo
"
\n
"
;
if
(
$intip
!=
''
)
{
echo
"
\n
Subnet masks are entered as bit counts (like CIDR notation).
\n
"
;
if
(
$version
===
6
)
{
...
...
@@ -313,6 +310,7 @@ function console_configure_ip_address($version)
}
}
}
while
(
!
$intbits_ok
);
echo
"
\n
"
;
if
(
$version
===
6
)
{
$subnet
=
gen_subnetv6
(
$intip
,
$intbits
);
...
...
@@ -516,7 +514,7 @@ if ($intip6 != '') {
if
(
$intip
!=
''
||
$intip6
!=
''
)
{
if
(
count
(
$ifdescrs
)
==
"1"
or
$interface
==
"lan"
)
{
echo
"
You can now access the web GUI by opening the following URL in your web browser:
\n
"
;
echo
"
\n
You can now access the web GUI by opening
\n
the following URL in your web browser:
\n
\n
"
;
if
(
!
empty
(
$config
[
'system'
][
'webgui'
][
'port'
]))
{
$webuiport
=
$config
[
'system'
][
'webgui'
][
'port'
];
if
(
$intip
!=
''
)
{
...
...
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