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:13:04 -0200 |
commit | 02e4ee541ba8af0992c6cd3acd468d731369b287 (patch) | |
tree | 4daf09d3bf8d28d58a42d1c15fa2b4b1a4da032b | |
parent | e68b7be076c96d18798ea302a6be89587332a513 (diff) | |
download | pfsense-02e4ee541ba8af0992c6cd3acd468d731369b287.zip pfsense-02e4ee541ba8af0992c6cd3acd468d731369b287.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; |