diff options
author | Renato Botelho <garga@FreeBSD.org> | 2014-12-26 13:00:08 -0200 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2014-12-26 13:00:08 -0200 |
commit | c07cd2ce79f56c96c886db818cb36651b5a334be (patch) | |
tree | 7d93dd3cdae6ef5d82f43aa0eb4b185d51c4bb23 | |
parent | da4f9b608a94358353b0f7a258ebed0481379249 (diff) | |
download | pfsense-c07cd2ce79f56c96c886db818cb36651b5a334be.zip pfsense-c07cd2ce79f56c96c886db818cb36651b5a334be.tar.gz |
Update /etc/ttys from new partition when upgrading nanobsd, and in this case do not call reload_ttys(). It should fix #4140
-rw-r--r-- | etc/inc/pfsense-utils.inc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index c1a77e4..07db39a 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -949,6 +949,7 @@ function reload_all_sync() { function setup_serial_port($when="save", $path="") { global $g, $config; conf_mount_rw(); + $ttys_file = "{$path}/etc/ttys"; $boot_config_file = "{$path}/boot.config"; $loader_conf_file = "{$path}/boot/loader.conf"; /* serial console - write out /boot.config */ @@ -1016,9 +1017,9 @@ function setup_serial_port($when="save", $path="") { file_put_contents($loader_conf_file, implode("\n", $new_boot_config) . "\n"); } } - $ttys = file_get_contents("/etc/ttys"); + $ttys = file_get_contents($ttys_file); $ttys_split = explode("\n", $ttys); - $fd = fopen("/etc/ttys", "w"); + $fd = fopen($ttys_file, "w"); $on_off = (is_serial_enabled() ? 'on' : 'off'); @@ -1039,7 +1040,8 @@ function setup_serial_port($when="save", $path="") { } unset($on_off, $console_type, $serial_type); fclose($fd); - reload_ttys(); + if ($when != "upgrade") + reload_ttys(); conf_mount_ro(); return; |