summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2011-10-31 15:02:07 -0400
committerjim-p <jimp@pfsense.org>2011-10-31 15:02:07 -0400
commit9d99eb95c95524b018c2754132c66451bf7b19ac (patch)
tree9f58db86810f5e843534e748ce77430e5a6f396d
parentc1becc31449ab147478fd05c8b139e00fddda729 (diff)
downloadpfsense-9d99eb95c95524b018c2754132c66451bf7b19ac.zip
pfsense-9d99eb95c95524b018c2754132c66451bf7b19ac.tar.gz
Allow the serial speed adjustment to work for nanobsd as well.
-rw-r--r--etc/inc/pfsense-utils.inc5
-rw-r--r--usr/local/www/system_advanced_admin.php6
2 files changed, 7 insertions, 4 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index f51ef58..5203d68 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -967,12 +967,15 @@ function setup_serial_port() {
&& (stripos($bcs, "boot_serial") === false))
$new_boot_config[] = $bcs;
+ $serialspeed = (is_numeric($config['system']['serialspeed'])) ? $config['system']['serialspeed'] : "9600";
if(isset($config['system']['enableserial'])) {
- $serialspeed = (is_numeric($config['system']['serialspeed'])) ? $config['system']['serialspeed'] : "9600";
$new_boot_config[] = 'boot_multicons="YES"';
$new_boot_config[] = 'boot_serial="YES"';
$new_boot_config[] = 'comconsole_speed="' . $serialspeed . '"';
$new_boot_config[] = 'console="comconsole,vidconsole"';
+ } elseif ($g['platform'] == "nanobsd") {
+ $new_boot_config[] = 'comconsole_speed="' . $serialspeed . '"';
+ $new_boot_config[] = 'console="comconsole"';
}
file_put_contents("/boot/loader.conf", implode("\n", $new_boot_config) . "\n");
}
diff --git a/usr/local/www/system_advanced_admin.php b/usr/local/www/system_advanced_admin.php
index e7aaa40..eb14d0c 100644
--- a/usr/local/www/system_advanced_admin.php
+++ b/usr/local/www/system_advanced_admin.php
@@ -485,10 +485,10 @@ function prot_change() {
<tr>
<td colspan="2" class="list" height="12">&nbsp;</td>
</tr>
- <?php if($g['platform'] == "pfSense" || $g['platform'] == "cdrom"): ?>
<tr>
<td colspan="2" valign="top" class="listtopic"><?=gettext("Serial Communcations"); ?></td>
</tr>
+ <?php if($g['platform'] == "pfSense" || $g['platform'] == "cdrom"): ?>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Serial Terminal"); ?></td>
<td width="78%" class="vtable">
@@ -497,6 +497,7 @@ function prot_change() {
<span class="vexpl"><?=gettext("Note: This will redirect the console output and messages to the serial port. You can still access the console menu from the internal video card/keyboard. A <b>null modem</b> serial cable or adapter is required to use the serial console."); ?></span>
</td>
</tr>
+ <?php endif; ?>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Serial Speed")?></td>
<td width="78%" class="vtable">
@@ -508,13 +509,12 @@ function prot_change() {
<option value="57600" <?php if ($pconfig['serialspeed'] == "57600") echo "selected";?>>57600</option>
<option value="115200" <?php if ($pconfig['serialspeed'] == "115200") echo "selected";?>>115200</option>
</select> bps
- <br/><?=gettext("Allows selection of different speeds for the serial console port, if enabled above."); ?>
+ <br/><?=gettext("Allows selection of different speeds for the serial console port."); ?>
</td>
</tr>
<tr>
<td colspan="2" class="list" height="12">&nbsp;</td>
</tr>
- <?php endif; ?>
<tr>
<td colspan="2" valign="top" class="listtopic"><?=gettext("Console Options"); ?></td>
</tr>
OpenPOWER on IntegriCloud