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
e9866f95
Commit
e9866f95
authored
Jul 02, 2015
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
config: adhere to defaults, but force a mismatch on factory bootup; #5
parent
33fec4ae
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
5 deletions
+13
-5
config.xml.sample
pkg/config.xml.sample
+2
-2
config.console.inc
src/etc/inc/config.console.inc
+11
-3
No files found.
pkg/config.xml.sample
View file @
e9866f95
...
@@ -210,7 +210,7 @@
...
@@ -210,7 +210,7 @@
<interfaces>
<interfaces>
<wan>
<wan>
<enable/>
<enable/>
<if>
em
1
</if>
<if>
mismatch
1
</if>
<mtu></mtu>
<mtu></mtu>
<ipaddr>
dhcp
</ipaddr>
<ipaddr>
dhcp
</ipaddr>
<ipaddrv6>
dhcp6
</ipaddrv6>
<ipaddrv6>
dhcp6
</ipaddrv6>
...
@@ -232,7 +232,7 @@
...
@@ -232,7 +232,7 @@
</wan>
</wan>
<lan>
<lan>
<enable/>
<enable/>
<if>
em
0
</if>
<if>
mismatch
0
</if>
<ipaddr>
192.168.1.1
</ipaddr>
<ipaddr>
192.168.1.1
</ipaddr>
<subnet>
24
</subnet>
<subnet>
24
</subnet>
<ipaddrv6>
track6
</ipaddrv6>
<ipaddrv6>
track6
</ipaddrv6>
...
...
src/etc/inc/config.console.inc
View file @
e9866f95
...
@@ -109,7 +109,8 @@ EOD;
...
@@ -109,7 +109,8 @@ EOD;
if
(
$interactive
)
{
if
(
$interactive
)
{
$wanif
=
chop
(
fgets
(
$fp
));
$wanif
=
chop
(
fgets
(
$fp
));
}
else
{
}
else
{
$wanif
=
$ifnames
[
0
];
/* more than one interface: put WAN as second one */
$wanif
=
count
(
$ifnames
)
>
1
?
$ifnames
[
1
]
:
''
;
echo
$wanif
.
PHP_EOL
;
echo
$wanif
.
PHP_EOL
;
}
}
...
@@ -135,7 +136,8 @@ EOD;
...
@@ -135,7 +136,8 @@ EOD;
if
(
$interactive
)
{
if
(
$interactive
)
{
$lanif
=
chop
(
fgets
(
$fp
));
$lanif
=
chop
(
fgets
(
$fp
));
}
else
{
}
else
{
$lanif
=
''
;
/* at least one interface: put LAN as first one */
$lanif
=
count
(
$ifnames
)
>
0
?
$ifnames
[
0
]
:
''
;
echo
$lanif
.
PHP_EOL
;
echo
$lanif
.
PHP_EOL
;
}
}
...
@@ -181,7 +183,13 @@ EOD;
...
@@ -181,7 +183,13 @@ EOD;
printf
(
gettext
(
"%sEnter the Optional %s interface name or 'a' for auto-detection%s"
.
printf
(
gettext
(
"%sEnter the Optional %s interface name or 'a' for auto-detection%s"
.
"(or nothing if finished):%s"
),
"
\n
"
,
$io
,
"
\n
"
,
" "
);
"(or nothing if finished):%s"
),
"
\n
"
,
$io
,
"
\n
"
,
" "
);
$optif
[
$i
]
=
chop
(
fgets
(
$fp
));
if
(
$interactive
)
{
$optif
[
$i
]
=
chop
(
fgets
(
$fp
));
}
else
{
/* never configure OPT in automatic assign */
$optif
[
$i
]
=
''
;
echo
$optif
[
$i
]
.
PHP_EOL
;
}
if
(
$optif
[
$i
]
==
''
)
{
if
(
$optif
[
$i
]
==
''
)
{
unset
(
$optif
[
$i
]);
unset
(
$optif
[
$i
]);
...
...
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