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
d5969056
Commit
d5969056
authored
Nov 26, 2016
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
system: always write consoles, figure out when serial is on
parent
f00d4309
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
system.inc
src/etc/inc/system.inc
+8
-4
No files found.
src/etc/inc/system.inc
View file @
d5969056
...
@@ -1585,18 +1585,22 @@ function system_login_configure()
...
@@ -1585,18 +1585,22 @@ function system_login_configure()
foreach
(
array
(
'primaryconsole'
,
'secondaryconsole'
)
as
$console_order
)
{
foreach
(
array
(
'primaryconsole'
,
'secondaryconsole'
)
as
$console_order
)
{
if
(
!
empty
(
$config
[
'system'
][
$console_order
])
&&
isset
(
$console_types
[
$config
[
'system'
][
$console_order
]]))
{
if
(
!
empty
(
$config
[
'system'
][
$console_order
])
&&
isset
(
$console_types
[
$config
[
'system'
][
$console_order
]]))
{
$console_selection
[]
=
$console_types
[
$config
[
'system'
][
$console_order
]][
'value'
];
$console_selection
[]
=
$console_types
[
$config
[
'system'
][
$console_order
]][
'value'
];
if
(
$config
[
'system'
][
$console_order
]
==
'serial'
)
{
/* make sure serial is enabled when selected, but not by checkbox */
$serial_enabled
=
true
;
}
}
}
}
}
$console_selection
=
array_unique
(
$console_selection
);
$console_selection
=
array_unique
(
$console_selection
);
if
(
$serial_enabled
)
{
$new_boot_config
[
'console'
]
=
'"'
.
implode
(
','
,
$console_selection
)
.
'"'
;
$new_boot_config
[
'console'
]
=
'"'
.
implode
(
','
,
$console_selection
)
.
'"'
;
$new_boot_config
[
'comconsole_speed'
]
=
'"'
.
$serialspeed
.
'"'
;
$new_boot_config
[
'boot_serial'
]
=
'"YES"'
;
if
(
count
(
$console_selection
)
>=
2
)
{
if
(
count
(
$console_selection
)
>=
2
)
{
$new_boot_config
[
'boot_multicons'
]
=
'"YES"'
;
$new_boot_config
[
'boot_multicons'
]
=
'"YES"'
;
}
}
if
(
$serial_enabled
)
{
$new_boot_config
[
'comconsole_speed'
]
=
'"'
.
$serialspeed
.
'"'
;
$new_boot_config
[
'boot_serial'
]
=
'"YES"'
;
}
}
/* reload static values from rc.loader.d */
/* reload static values from rc.loader.d */
...
...
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