Projet

Général

Profil

« Précédent | Suivant » 

Révision 4887afa1

Ajouté par Renato Botelho il y a presque 10 ans

Set default serial speed to 115200 for 2.2, fixes #3715

Voir les différences:

etc/inc/pfsense-utils.inc
988 988
	else
989 989
		$boot_config = "";
990 990

  
991
	$serialspeed = (is_numeric($config['system']['serialspeed'])) ? $config['system']['serialspeed'] : "115200";
991 992
	if(($g['platform'] != "cdrom") && ($g['platform'] != "nanobsd")) {
992 993
		$boot_config_split = explode("\n", $boot_config);
993 994
		$fd = fopen($boot_config_file,"w");
......
1001 1002
				}
1002 1003
			}
1003 1004
			if(isset($config['system']['enableserial']) || $g['enableserial_force']) {
1004
				fwrite($fd, "-D");
1005
				fwrite($fd, "-S{$serialspeed} -D");
1005 1006
			}
1006 1007
			fclose($fd);
1007 1008
		}
......
1024 1025
					&& (stripos($bcs, "hw.usb.no_pf") === false))
1025 1026
					$new_boot_config[] = $bcs;
1026 1027

  
1027
			$serialspeed = (is_numeric($config['system']['serialspeed'])) ? $config['system']['serialspeed'] : "9600";
1028 1028
			if(isset($config['system']['enableserial']) || $g['enableserial_force']) {
1029 1029
				$new_boot_config[] = 'boot_multicons="YES"';
1030 1030
				$new_boot_config[] = 'boot_serial="YES"';
1031
				$new_boot_config[] = 'comconsole_speed="' . $serialspeed . '"';
1032 1031
				$primaryconsole = isset($g['primaryconsole_force']) ? $g['primaryconsole_force'] : $config['system']['primaryconsole'];
1033 1032
				switch ($primaryconsole) {
1034 1033
					case "video":
......
1038 1037
					default:
1039 1038
						$new_boot_config[] = 'console="comconsole,vidconsole"';
1040 1039
				}
1041
			} elseif ($g['platform'] == "nanobsd") {
1042
				$new_boot_config[] = 'comconsole_speed="' . $serialspeed . '"';
1043 1040
			}
1044

  
1041
			$new_boot_config[] = 'comconsole_speed="' . $serialspeed . '"';
1045 1042
			$new_boot_config[] = 'hw.usb.no_pf="1"';
1046 1043

  
1047 1044
			file_put_contents($loader_conf_file, implode("\n", $new_boot_config) . "\n");

Formats disponibles : Unified diff