Skip to content

Commit

Permalink
system: always write consoles, figure out when serial is on
Browse files Browse the repository at this point in the history
  • Loading branch information
fichtner committed Nov 26, 2016
1 parent f00d430 commit d596905
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/etc/inc/system.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1585,18 +1585,22 @@ function system_login_configure()
foreach (array('primaryconsole', 'secondaryconsole') as $console_order) {
if (!empty($config['system'][$console_order]) && isset($console_types[$config['system'][$console_order]])) {
$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);
$new_boot_config['console'] = '"' . implode(',', $console_selection) . '"';
if (count($console_selection) >= 2) {
$new_boot_config['boot_multicons'] = '"YES"';
}

if ($serial_enabled) {
$new_boot_config['console'] = '"' . implode(',', $console_selection) . '"';
$new_boot_config['comconsole_speed'] = '"'.$serialspeed.'"';
$new_boot_config['boot_serial'] = '"YES"';
if (count($console_selection) >= 2) {
$new_boot_config['boot_multicons'] = '"YES"';
}
}

/* reload static values from rc.loader.d */
Expand Down

0 comments on commit d596905

Please sign in to comment.