diff options
Diffstat (limited to 'etc/inc')
-rw-r--r-- | etc/inc/pfsense-utils.inc | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index b58fb5e..1d7e313 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -982,7 +982,7 @@ function reload_all_sync() { } function setup_serial_port($when="save", $path="") { - global $g, $config; + global $g, $config, $device_type; conf_mount_rw(); $ttys_file = "{$path}/etc/ttys"; $boot_config_file = "{$path}/boot.config"; @@ -1039,9 +1039,12 @@ function setup_serial_port($when="save", $path="") { // do not contain a console directive. foreach ($boot_config_split as $bcs) { if (!empty($bcs) && - (stripos($bcs, "console") === false) && - (stripos($bcs, "boot_multicons") === false) && - (stripos($bcs, "boot_serial") === false)) { + (stripos($bcs, "console") === false) && + (stripos($bcs, "boot_multicons") === false) && + (stripos($bcs, "boot_serial") === false)) && + (stripos($bcs, "hw.usb.no_pf") === false) && + (stripos($bcs, "hint.uart.0.flags") === false) && + (stripos($bcs, "hint.uart.1.flags") === false)) { $new_boot_config[] = $bcs; } } @@ -1063,6 +1066,14 @@ function setup_serial_port($when="save", $path="") { } } $new_boot_config[] = 'comconsole_speed="' . $serialspeed . '"'; + + $specplatform = system_identify_specific_platform(); + if ($device_type == "ADI" || $specplatform['name'] == "RCC-VE") { + $new_boot_config[] = 'comconsole_port="0x2F8"'; + $new_boot_config[] = 'hint.uart.0.flags="0x00"'; + $new_boot_config[] = 'hint.uart.1.flags="0x10"'; + } + $new_boot_config[] = 'hw.usb.no_pf="1"'; file_put_contents($loader_conf_file, implode("\n", $new_boot_config) . "\n"); } |