Main repository for pfSense
Go to file
Phil Davis ba667cc6f4 Fix console set interface IP address
Problem as per forum https://forum.pfsense.org/index.php?topic=83651.0
The problem comes whenever services_dhcpd_configure is called - the global $config gets reset from the actual current config, and any pending changes in the current process are lost.
It was introduced by commit 86ce2df
in which services_dhcpdv4_configure() does:

require_once('pkg-utils.inc')

and pkg-utils.inc does various stuff like:

if(file_exists("/cf/conf/use_xmlreader"))
require_once("xmlreader.inc");
else
require_once("xmlparse.inc");

which seems to cause a reset of the $config variable, thus losing the pending changes the user has entered at the console.

The top-level code in rc.initial.setlanip really does not need to (and should not) implement any changes along the way - it should collect all the answers from the user, then write_config and then make all the necessary calls to routines to implement the changes on the running system. This fixes it - defer any calls to services_dhcpd_configure() until after all questions are answered and write_config has happened.
2014-11-03 20:49:15 +05:45
boot Add hw.usb.no_pf="1" to loader.conf on nanobsd 2013-02-01 22:58:38 +01:00
cf/conf Its long overdue the ez-ipupdate.cache file 2014-04-26 09:59:37 +00:00
conf.default Add powerd normal mode flag (-n) 2014-10-05 18:35:08 -04:00
etc Fix console set interface IP address 2014-11-03 20:49:15 +05:45
root remove the command number shown in the shell prompt, it's a pointless 2014-10-21 12:46:38 -05:00
sbin Avoid reseting firewall hostname by WAN DHCP. It should fix #3746 2014-07-07 20:12:54 -03:00
tmp Fix #3749: 2014-07-11 08:23:04 -03:00
usr Merge pull request #1328 from wagonza/master 2014-11-03 10:56:16 -02:00
.gitattributes include gettext locales in line encoding list 2014-01-13 22:05:10 -05:00
.gitignore Ignore vim swap files 2013-03-08 14:41:01 -03:00
license.txt License Agreement 2014-04-14 18:40:47 -05:00