mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
If /boot/loader.conf is not presetn check /boot/loader.conf.local.
This commit is contained in:
parent
59104a6ff6
commit
4ff3adec7a
@ -1164,7 +1164,14 @@ function setup_serial_port($when = "save", $path = "") {
|
||||
system("echo \"Reading {$loader_conf_file}...\" >> /conf/upgrade_log.txt");
|
||||
}
|
||||
|
||||
$loader_conf = file_get_contents($loader_conf_file);
|
||||
if (file_exists($loader_conf_file)) {
|
||||
$loader_conf = file_get_contents($loader_conf_file);
|
||||
} elseif (file_exists("{$path}/boot/loader.conf.local")) {
|
||||
$loader_conf_file = "{$path}/boot/loader.conf.local";
|
||||
$loader_conf = file_get_contents($loader_conf_file);
|
||||
} else {
|
||||
$loader_conf = "";
|
||||
}
|
||||
$loader_conf_split = explode("\n", $loader_conf);
|
||||
|
||||
$data = array();
|
||||
|
||||
@ -35,11 +35,9 @@ if [ -f /var/log/dmesg.boot ]; then
|
||||
fi
|
||||
|
||||
# Check for different HZ
|
||||
if [ -f /boot/loader.conf ]; then
|
||||
HZ=`/usr/bin/grep -c kern.hz /boot/loader.conf`
|
||||
if [ "$HZ" = "1" ]; then
|
||||
NOTELENGTH="10"
|
||||
fi
|
||||
HZ=`/sbin/sysctl -n kern.hz`
|
||||
if [ "$HZ" = "1" ]; then
|
||||
NOTELENGTH="10"
|
||||
fi
|
||||
|
||||
if [ -c "/dev/speaker" ]; then
|
||||
|
||||
@ -303,6 +303,14 @@ if ($_POST) {
|
||||
}
|
||||
unset($loaderconf);
|
||||
}
|
||||
if (file_exists("/boot/loader.conf.local")) {
|
||||
$loaderconf = file_get_contents("/boot/loader.conf.local");
|
||||
if (strpos($loaderconf, "console=\"comconsole")) {
|
||||
$config['system']['enableserial'] = true;
|
||||
write_config(gettext("Restore serial console enabling in configuration."));
|
||||
}
|
||||
unset($loaderconf);
|
||||
}
|
||||
/* extract out rrd items, unset from $config when done */
|
||||
if ($config['rrddata']) {
|
||||
restore_rrddata();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user