diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2006-01-21 22:57:47 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2006-01-21 22:57:47 +0000 |
commit | 96af3ad5175dc5fc4bd7f815d131c254784ad744 (patch) | |
tree | 9ce0a721cc9b3b48228b89b1915cb486aa39d2fc /usr | |
parent | b5768352c782554d1d30850fab74f22e42055911 (diff) | |
download | pfsense-96af3ad5175dc5fc4bd7f815d131c254784ad744.zip pfsense-96af3ad5175dc5fc4bd7f815d131c254784ad744.tar.gz |
MFC 9548
Shift serial port toggle routine to pfsense-utils.inc. Call this function after configuration import to setup needed bits on system for serial console if need be. Shift console locjout routine to pfsense-utils.inc. Call this function from serial port code to setup if auto login / console lockout is enabled after config restore
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/local/www/diag_backup.php | 1 | ||||
-rwxr-xr-x | usr/local/www/system_advanced.php | 47 |
2 files changed, 2 insertions, 46 deletions
diff --git a/usr/local/www/diag_backup.php b/usr/local/www/diag_backup.php index bdd01ac..d27155a 100755 --- a/usr/local/www/diag_backup.php +++ b/usr/local/www/diag_backup.php @@ -171,6 +171,7 @@ if ($_POST) { $savemsg = "The configuration has been restored.<p>The firewall is now rebooting due to captive portal."; $reboot_needed = true; } + setup_serial_port(); } else { $input_errors[] = "The configuration could not be restored."; } diff --git a/usr/local/www/system_advanced.php b/usr/local/www/system_advanced.php index dc77910..44bb1b2 100755 --- a/usr/local/www/system_advanced.php +++ b/usr/local/www/system_advanced.php @@ -216,53 +216,8 @@ if ($_POST) { $savemsg = $retval; $retval |= interfaces_optional_configure(); config_unlock(); - - conf_mount_rw(); - - /* serial console - write out /boot.config */ - if(file_exists("/boot.config")) - $boot_config = file_get_contents("/boot.config"); - else - $boot_config = ""; - $boot_config_split = split("\n", $boot_config); - if($g['platform'] <> "cdrom") { - $fd = fopen("/boot.config","w"); - if($fd) { - foreach($boot_config_split as $bcs) { - if(stristr($bcs, "-D")) { - /* DONT WRITE OUT, WE'LL DO IT LATER */ - } else { - if($bcs <> "") - fwrite($fd, "{$bcs}\n"); - } - } - if(isset($config['system']['enableserial'])) { - fwrite($fd, "-D"); - } - fclose($fd); - } - /* serial console - write out /boot/loader.conf */ - $boot_config = file_get_contents("/boot/loader.conf"); - $boot_config_split = split("\n", $boot_config); - $fd = fopen("/boot/loader.conf","w"); - if($fd) { - foreach($boot_config_split as $bcs) { - if(stristr($bcs, "console")) { - /* DONT WRITE OUT, WE'LL DO IT LATER */ - } else { - if($bcs <> "") - fwrite($fd, "{$bcs}\n"); - } - } - if(isset($config['system']['enableserial'])) { - fwrite($fd, "console=\"comconsole\"\n"); - } - fclose($fd); - } - } - - conf_mount_ro(); + setup_serial_port(); setup_filter_bridge(); |