summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www
diff options
context:
space:
mode:
authorLuiz Souza <luiz@netgate.com>2019-02-12 20:48:15 -0200
committerjim-p <jimp@netgate.com>2019-02-13 08:38:58 -0500
commitbe8a5a8a71d4f6022ab7cd7233133b51a79cf84a (patch)
tree11360a680eeebb9115c291806b0d1c1f4ee77b28 /src/usr/local/www
parentb473b576ef5e6b94a767d820adc46195ade7daee (diff)
downloadpfsense-be8a5a8a71d4f6022ab7cd7233133b51a79cf84a.zip
pfsense-be8a5a8a71d4f6022ab7cd7233133b51a79cf84a.tar.gz
Force the <enableserial> on when restoring a backup on a device with serial only console.
Affects multiple devices. Ticket #1547 (cherry picked from commit c91af4ac6a6b501b59a542acb4ace05e2b10e3ea)
Diffstat (limited to 'src/usr/local/www')
-rw-r--r--src/usr/local/www/diag_backup.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/usr/local/www/diag_backup.php b/src/usr/local/www/diag_backup.php
index 0c502dc..f54ef52 100644
--- a/src/usr/local/www/diag_backup.php
+++ b/src/usr/local/www/diag_backup.php
@@ -328,7 +328,8 @@ if ($_POST) {
if (file_exists("/boot/loader.conf")) {
$loaderconf = file_get_contents("/boot/loader.conf");
- if (strpos($loaderconf, "console=\"comconsole")) {
+ if (strpos($loaderconf, "console=\"comconsole") ||
+ strpos($loaderconf, "boot_serial=\"YES") {
$config['system']['enableserial'] = true;
write_config(gettext("Restore serial console enabling in configuration."));
}
@@ -336,7 +337,8 @@ if ($_POST) {
}
if (file_exists("/boot/loader.conf.local")) {
$loaderconf = file_get_contents("/boot/loader.conf.local");
- if (strpos($loaderconf, "console=\"comconsole")) {
+ if (strpos($loaderconf, "console=\"comconsole") ||
+ strpos($loaderconf, "boot_serial=\"YES") {
$config['system']['enableserial'] = true;
write_config(gettext("Restore serial console enabling in configuration."));
}
OpenPOWER on IntegriCloud