mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 00:54:41 +00:00
system: add xc0 entry video console entry if node exists; closes #4688
This commit is contained in:
parent
e9947f07cd
commit
d5d52ac975
@ -1176,6 +1176,7 @@ function system_login_configure($verbose = false)
|
||||
/* setup /etc/ttys */
|
||||
$etc_ttys_lines = explode("\n", file_get_contents('/etc/ttys'));
|
||||
$fd = fopen('/etc/ttys', 'w');
|
||||
|
||||
$on_off_secure_u = $serial_enabled ? (isset($config['system']['serialusb']) ? 'on' : 'onifconsole') . ' secure' : 'off secure';
|
||||
$on_off_secure_v = $virtual_enabled ? 'onifexists secure' : 'off secure';
|
||||
if (isset($config['system']['disableconsolemenu'])) {
|
||||
@ -1185,6 +1186,7 @@ function system_login_configure($verbose = false)
|
||||
$console_type = 'al.Pc';
|
||||
$serial_type = 'al.3wire.' . $serialspeed;
|
||||
}
|
||||
|
||||
foreach ($etc_ttys_lines as $tty) {
|
||||
/* virtual terminals */
|
||||
foreach (array('ttyv0', 'ttyv1', 'ttyv2', 'ttyv3', 'ttyv4', 'ttyv5', 'ttyv6', 'ttyv7') as $virtualport) {
|
||||
@ -1202,11 +1204,16 @@ function system_login_configure($verbose = false)
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($tty)) {
|
||||
if (!empty($tty) && strpos($tty, 'xc0') === false) {
|
||||
/* all other lines stay the same */
|
||||
fwrite($fd, $tty . "\n");
|
||||
}
|
||||
}
|
||||
|
||||
if (file_exists('/dev/xc0')) {
|
||||
fwrite($fd, "xc0\t\"/usr/libexec/getty {$console_type}\"\t\txterm\t${on_off_secure_v}\n");
|
||||
}
|
||||
|
||||
fclose($fd);
|
||||
|
||||
if ($verbose) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user