Am 06.02.2014 18:43, schrieb Brian Candler:
>>> I find that the one restored
>>> >via web interface has:
>>> >
>>> >* an extra file /boot.config containing "-D"
>>> >* extra settings in /boot/loader.conf
>>> >
>>> >boot_multicons="YES"
>>> >boot_serial="YES"
>>> >comconsole_speed="115200"
>>> >console="comconsole,vidconsole"
>> So these parameters are added blindly regardless of whether they were
>> set before, is that what you're saying? If so, that sounds like a nasty
>> bug to me.
> Not exactly blindly: the boot config is overwritten based on what's in
> the XML. See setup_serial_port() in /etc/inc/pfsense-utils.inc
> 
>                 $fd = fopen($boot_config_file,"w");
> ...
>                         if(isset($config['system']['enableserial'])) {
>                                 fwrite($fd, "-D");
>                         }
> ...
>                         if(isset($config['system']['enableserial'])) {
>                                 $new_boot_config[] =
> 'boot_multicons="YES"';
>                                 $new_boot_config[] = 'boot_serial="YES"';
>                                 $new_boot_config[] =
> 'comconsole_speed="' . $serialspeed . '"';
>                                 $new_boot_config[] =
> 'console="comconsole,vidconsole"';

I finally had some spare time to re-visit this issue.
Turns out my config file did contain the "enableserial" parameter -
$DEITY knows why, because I never ran the system via serial console, in
fact, it never had one to begin with (virtual machine).

So, for everyone that doesn't understand PHP well enough to figure out
what the code snippet quoted by Brian above does ... this is what you
need to do if you want to get rid of the issue:

1) Change to the directory where your config.xml resides

2) run one of the two following commands:

# "clean" way of handling XML, with backup copies of config files
# requires xmlstarlet present (not the case on default pfSense install)
xmlstarlet ed -d "/pfsense/system/enableserial" config.xml > config.new
&& cp config.xml config.old && cp config.new config.xml

# quick and dirty way operating in-place, works on default pfSense
sed -i -e '/<enableserial/d' config.xml

3) if you did this in your live pfSense system, run
rm /tmp/config.cache ; /etc/rc.reload_all

Do this before triggering the upgrade process and you should be safe.

-Stefan
_______________________________________________
List mailing list
List@lists.pfsense.org
https://lists.pfsense.org/mailman/listinfo/list

Reply via email to