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
ed2ded1c
Commit
ed2ded1c
authored
Jan 23, 2017
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
system: make vt/sc configurable; closes #1343
parent
56f7c3f8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
17 deletions
+35
-17
system.inc
src/etc/inc/system.inc
+5
-0
20-misc
src/etc/rc.loader.d/20-misc
+0
-1
system_advanced_admin.php
src/www/system_advanced_admin.php
+30
-16
No files found.
src/etc/inc/system.inc
View file @
ed2ded1c
...
...
@@ -1715,6 +1715,7 @@ function system_login_configure($verbose = false)
$new_boot_config
[
'comconsole_speed'
]
=
null
;
$new_boot_config
[
'boot_multicons'
]
=
null
;
$new_boot_config
[
'boot_serial'
]
=
null
;
$new_boot_config
[
'kern.vty'
]
=
'vt'
;
$new_boot_config
[
'console'
]
=
null
;
$console_types
=
system_console_types
();
...
...
@@ -1750,6 +1751,10 @@ function system_login_configure($verbose = false)
@
unlink
(
'/boot.config'
);
}
if
(
empty
(
$config
[
'system'
][
'usevirtualterminal'
]))
{
$new_boot_config
[
'kern.vty'
]
=
'sc'
;
}
/* reload static values from rc.loader.d */
mwexecf
(
'/usr/local/etc/rc.loader'
);
...
...
src/etc/rc.loader.d/20-misc
View file @
ed2ded1c
autoboot_delay="3"
hw.usb.no_pf="1"
kern.vty="sc"
src/www/system_advanced_admin.php
View file @
ed2ded1c
...
...
@@ -46,6 +46,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
}
$pconfig
[
'disablehttpredirect'
]
=
isset
(
$config
[
'system'
][
'webgui'
][
'disablehttpredirect'
]);
$pconfig
[
'disableconsolemenu'
]
=
isset
(
$config
[
'system'
][
'disableconsolemenu'
]);
$pconfig
[
'usevirtualterminal'
]
=
isset
(
$config
[
'system'
][
'usevirtualterminal'
]);
$pconfig
[
'disableintegratedauth'
]
=
!
empty
(
$config
[
'system'
][
'disableintegratedauth'
]);
$pconfig
[
'sudo_allow_wheel'
]
=
$config
[
'system'
][
'sudo_allow_wheel'
];
$pconfig
[
'noantilockout'
]
=
isset
(
$config
[
'system'
][
'webgui'
][
'noantilockout'
]);
...
...
@@ -127,6 +128,12 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
unset
(
$config
[
'system'
][
'disableconsolemenu'
]);
}
if
(
!
empty
(
$pconfig
[
'usevirtualterminal'
]))
{
$config
[
'system'
][
'usevirtualterminal'
]
=
true
;
}
elseif
(
isset
(
$config
[
'system'
][
'usevirtualterminal'
]))
{
unset
(
$config
[
'system'
][
'usevirtualterminal'
]);
}
if
(
!
empty
(
$pconfig
[
'disableintegratedauth'
]))
{
$config
[
'system'
][
'disableintegratedauth'
]
=
true
;
}
elseif
(
isset
(
$config
[
'system'
][
'disableintegratedauth'
]))
{
...
...
@@ -536,22 +543,6 @@ include("head.inc");
<tr>
<th
colspan=
"2"
>
<?=
gettext
(
"Console Options"
);
?>
</th>
</tr>
<tr>
<td><a
id=
"help_for_serialspeed"
href=
"#"
class=
"showhelp"
><i
class=
"fa fa-info-circle"
></i></a>
<?=
gettext
(
"Serial Speed"
)
?>
</td>
<td>
<select
name=
"serialspeed"
id=
"serialspeed"
class=
"formselect selectpicker"
>
<option
value=
"115200"
<?=
$pconfig
[
'serialspeed'
]
==
"115200"
?
'selected="selected"'
:
''
?>
>
115200
</option>
<option
value=
"57600"
<?=
$pconfig
[
'serialspeed'
]
==
"57600"
?
'selected="selected"'
:
''
?>
>
57600
</option>
<option
value=
"38400"
<?=
$pconfig
[
'serialspeed'
]
==
"38400"
?
'selected="selected"'
:
''
?>
>
38400
</option>
<option
value=
"19200"
<?=
$pconfig
[
'serialspeed'
]
==
"19200"
?
'selected="selected"'
:
''
?>
>
19200
</option>
<option
value=
"14400"
<?=
$pconfig
[
'serialspeed'
]
==
"14400"
?
'selected="selected"'
:
''
?>
>
14400
</option>
<option
value=
"9600"
<?=
$pconfig
[
'serialspeed'
]
==
"9600"
?
'selected="selected"'
:
''
?>
>
9600
</option>
</select>
<div
class=
"hidden"
for=
"help_for_serialspeed"
>
<?=
gettext
(
"Allows selection of different speeds for the serial console port."
);
?>
</div>
</td>
</tr>
<tr>
<td><a
id=
"help_for_primaryconsole"
href=
"#"
class=
"showhelp"
><i
class=
"fa fa-info-circle"
></i></a>
<?=
gettext
(
"Primary Console"
)
?>
</td>
<td
width=
"78%"
>
...
...
@@ -581,6 +572,22 @@ include("head.inc");
</div>
</td>
</tr>
<tr>
<td><a
id=
"help_for_serialspeed"
href=
"#"
class=
"showhelp"
><i
class=
"fa fa-info-circle"
></i></a>
<?=
gettext
(
"Serial Speed"
)
?>
</td>
<td>
<select
name=
"serialspeed"
id=
"serialspeed"
class=
"formselect selectpicker"
>
<option
value=
"115200"
<?=
$pconfig
[
'serialspeed'
]
==
"115200"
?
'selected="selected"'
:
''
?>
>
115200
</option>
<option
value=
"57600"
<?=
$pconfig
[
'serialspeed'
]
==
"57600"
?
'selected="selected"'
:
''
?>
>
57600
</option>
<option
value=
"38400"
<?=
$pconfig
[
'serialspeed'
]
==
"38400"
?
'selected="selected"'
:
''
?>
>
38400
</option>
<option
value=
"19200"
<?=
$pconfig
[
'serialspeed'
]
==
"19200"
?
'selected="selected"'
:
''
?>
>
19200
</option>
<option
value=
"14400"
<?=
$pconfig
[
'serialspeed'
]
==
"14400"
?
'selected="selected"'
:
''
?>
>
14400
</option>
<option
value=
"9600"
<?=
$pconfig
[
'serialspeed'
]
==
"9600"
?
'selected="selected"'
:
''
?>
>
9600
</option>
</select>
<div
class=
"hidden"
for=
"help_for_serialspeed"
>
<?=
gettext
(
"Allows selection of different speeds for the serial console port."
);
?>
</div>
</td>
</tr>
<tr>
<td><i
class=
"fa fa-info-circle text-muted"
></i></a>
<?=
gettext
(
"Console menu"
)
?>
</td>
<td
width=
"78%"
>
...
...
@@ -588,6 +595,13 @@ include("head.inc");
<strong>
<?=
gettext
(
"Password protect the console menu"
);
?>
</strong>
</td>
</tr>
<tr>
<td><i
class=
"fa fa-info-circle text-muted"
></i></a>
<?=
gettext
(
'Console driver'
)
?>
</td>
<td
width=
"78%"
>
<input
name=
"usevirtualterminal"
type=
"checkbox"
value=
"yes"
<?=
empty
(
$pconfig
[
'usevirtualterminal'
])
?
''
:
'checked="checked"'
?>
/>
<strong>
<?=
gettext
(
'Use the virtual terminal driver (vt)'
)
?>
</strong>
</td>
</tr>
<tr>
<td><a
id=
"help_for_disableintegratedauth"
href=
"#"
class=
"showhelp"
><i
class=
"fa fa-info-circle"
></i></a>
<?=
gettext
(
"Integrated authentication"
)
?>
</td>
<td
width=
"78%"
>
...
...
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