summaryrefslogtreecommitdiffstats
path: root/etc/rc.initial.setlanip
Commit message (Collapse)AuthorAgeFilesLines
* Validation of y/n answers in setlanipPhil Davis2014-12-121-31/+33
| | | | | | | | At the moment the user can answer "yes" to most of the questions, but then later code only checks if the answer is "y". Thus you can type in "yes" in some places, have it accepted, but actually the negative action is taken. That is weird and will mess up people who try typing a whole string starting with "y". With this change it makes the user type one of "y", "yes", "n", "no". When they type 1 of those, it is turned into either "y" or "n". Then the existing implementation logic all works as expected. Hopefully this is the "final" version that fixes the behavior of the (y/n) questions. I also included the bit at 296-297 which adds the CIDR bit-count range to the prompt, so the user can see exactly what input is valid/expected there. Redmine issue #4100
* rc.initial.setlanip fix validation of CIDR within rangePhil Davis2014-12-121-1/+1
| | | | | Currently this allows the user to input any number for the CIDR. I happened to try 44 for an IPv4 CIDR when playing. This fixes that little bug - I think it is good to commit that first/separately so it can be identified apart from the other (y/n) checking/handling I am working on. Better to have separate commits for distinct bugs.
* Provide success return indication from console_configure_dhcpdPhil Davis2014-12-071-0/+1
| | | | | | | Recent commit https://github.com/pfsense/pfsense/commit/9ea554ee5cb25ea3bf5bb6bf7997c6c7379ce349 added testing of the return status of console_configure_dhcpd() - this let a user effectively abort from doing anything if they have answered "y" to prompt_for_enable_dhcp_server() and are being asked for the start and end of the range, and then decide they do not want to proceed. However, even when they gave good answers, status 0 was being returned. This prevented changes ever being implemented. Redmine: https://redmine.pfsense.org/issues/4080 The fix is to return 1 at the routine end, when all is good and the code should proceed.
* Preserve exit code lost from s/exit/return/Ermal LUÇI2014-12-021-2/+2
|
* Remove exit from as much as possible backend codeErmal LUÇI2014-12-021-8/+10
|
* Static gateways weren't being added to the routing table after configuring ↵Chris Buechler2014-11-171-0/+2
| | | | at the console, fix that.
* Fixup dhcpd interface enabled checkPhil Davis2014-11-031-4/+1
|
* Fix console set interface IP addressPhil Davis2014-11-031-7/+5
| | | | | | | | | | | | | | | | | | | 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.
* Set interface address from consol tidy outputPhil Davis2014-11-031-5/+4
| | | | | | | | | While trying to see why this is not working for me (forum https://forum.pfsense.org/index.php?topic=83651.0 ) I have fixed some little things: 1) Get the new-lines right so the output of the restarting looks neat 2) Fix a comparison that had just a single equal sign - it did not break anything real because the subsequent code was just text output to the console. Now that text output does take notice of the correctly-evaluated condition, and $interface is not overwritten. The issue in the forum post, about the interface IP address config not actually changing, is still the case, at least for me. IMO these little tidy ups might as well be committed. They make this code better!
* Enhance interface gateway data entry descriptionsPhillip Davis2014-02-071-2/+2
|
* Use correct vars for IPv6 when checking subnet start and endPhil Davis2013-12-091-3/+3
|
* Check that DHCP end IP is >= DHCP start IPPhil Davis2013-12-091-23/+29
|
* Fix checking DHCP end IP is in rangePhil Davis2013-12-081-1/+1
| | | Cut-paste bug
* Check if dhcp start and end addresses are inside interface subnet, helps #3196Renato Botelho2013-12-061-3/+11
|
* When user attempt to set network or broadcast address, ask again for the IP ↵Renato Botelho2013-12-061-64/+69
| | | | address. Issue #3196
* Prevent network or broadcast address to be set on interface (console, GUI ↵Renato Botelho2013-12-041-1/+12
| | | | and wizard). It should fix #3196
* Check if IP is already configured on console setupRenato Botelho2013-03-141-1/+6
|
* Fix issues on "Set interface(s) IP address" optionRenato Botelho2013-02-201-27/+34
| | | | | | | - Avoid duplicate gateway entries - Fix checking if a default gw already exists - Set IPv6 to none when user choose it - Set gateway on interface
* Fix dhcp v6 config section name for console setup and check on ↵Renato Botelho2013-02-201-7/+7
| | | | interfaces.php, the correct is dhcpdv6 instead of dhcpd6. Fixes #2827
* Interface assignment wrongly changing:Renato Botelho2013-01-071-1/+1
| | | | | | | | When WAN is set to PPPoE and user set other interfaces IP address using console, it wrongly change the interface assignment to use the same device of wan. It was caused by a hard coded "wan" on console_get_interface_from_ppp() call, when it should use $interface instead. It should fix #2074
* add gateways to config from cmdlineDarren Embry2012-06-071-1/+60
|
* again, string interpolation kinda defeats the purpose of gettext. ;-)Darren Embry2012-06-071-5/+9
|
* variable interpolation defeats the purpose of gettext.Darren Embry2012-06-071-15/+23
|
* work in progress: set gateway IPs from consoleDarren Embry2012-06-071-21/+63
| | | | | | | | - add --dry-run mode - prompts for gateway IP address as needed does not yet do: - add gateway to config
* show dhcp/dhcp6/static/staticv6 along with descriptions in consoleDarren Embry2012-06-071-2/+27
|
* show real interface namesDarren Embry2012-06-071-2/+3
|
* minor variable name change.Darren Embry2012-06-071-4/+4
|
* actually display webconfigurator port numbers on consoleDarren Embry2012-06-071-3/+3
|
* setting $config['interfaces']['wan']['ipaddrv6'] to 'dhcp6' *should* work now.Darren Embry2012-06-071-1/+1
|
* now shows ipv6 webConfigurator URLs (#2413)Darren Embry2012-06-071-2/+20
|
* feature #2413 Allow IPv6 interface configuration from the menuDarren Embry2012-05-171-53/+107
|
* normalize indentationDarren Embry2012-05-171-210/+210
|
* Correct behaviour of switching from console from any ppp type device to ↵Ermal2011-09-121-3/+26
| | | | other type. This has been broken since new ppp code.
* Simplify message that wraps off screenScott Ullrich2011-06-191-1/+1
|
* Fixes #1444. Implements the same fix that issue ermal made in #1522 to the ↵lgcosta2011-05-231-1/+1
| | | | console menu
* When setting the ip from the console also enable the interface otherwise the ↵Ermal2011-01-281-1/+2
| | | | HTTP_REFERER checks will not let you use the GUI.
* Show disabled interfaces as wellScott Ullrich2010-08-091-1/+1
|
* Make sure <dhcpd><wan> exists before blindly unsetting.Scott Ullrich2010-03-101-1/+3
|
* if reverted to HTTP, restart lightyChris Buechler2010-02-271-1/+7
|
* Decouple filter.inc from functions.inc. There is no need to process filter ↵Scott Ullrich2009-11-211-0/+3
| | | | functions most of the time. Include filter.inc where it is needed
* Really restart DHCPD server after changesScott Ullrich2009-08-121-3/+9
|
* move killall dhcpd above section that exits if no DHCP servers are enabled, ↵Chris Buechler2009-03-101-1/+3
| | | | | | and configure dhcpd if it's disabled by option #2 at the console. Ticket #1867 (cvstrac)
* Add services_dhcp_server_enable which allows the DHCP server to be turnedScott Ullrich2008-10-291-2/+3
| | | | off easily.
* Reload interface being worked on, not blindly lanScott Ullrich2008-10-271-1/+1
|
* Rename interfaces_wan_configure to interface_configure now that it is used ↵Ermal Luçi2008-09-091-1/+1
| | | | for all assigned interface configuration.
* Merge lan configuration to the interfaces_wan.php page wich does the ↵Ermal Luçi2008-09-071-1/+1
| | | | | | configuration of all other assigned interfaces.
* we don't care if rm can't find old dhcpd database filesBill Marquette2008-09-071-1/+1
|
* fix debug code that never worked and make it disabled by defaultBill Marquette2008-09-071-2/+4
|
* Semicolons after if's apparently parse...but it's not terribly helpfulBill Marquette2008-09-071-2/+2
|
* Check to see if key exists before unsettingScott Ullrich2008-09-071-1/+2
|
OpenPOWER on IntegriCloud