27 Commits

Author SHA1 Message Date
Franco Fichtner
6ee8eb7812 src: remove a whole lotta nop
Lookie how far we've come...
2016-02-03 08:43:06 +01:00
Franco Fichtner
41479a3dfb console: fix access test of gateways array 2015-11-16 07:47:35 +01:00
Ad Schellevis
892bbe7198 (legacy) add missing dependency, source crashreport
PHP Fatal error:  Call to undefined function system_hosts_generate() in /usr/local/etc/inc/interfaces.inc on line 3129
2015-08-04 14:52:03 +00:00
Franco Fichtner
bf8356c977 rc.initial: apply PSR2 style 2015-07-28 20:59:56 +02:00
Franco Fichtner
6819d40986 console: fix ppp iteration crash report 2015-07-27 08:22:44 +02:00
Ad Schellevis
020ce673cd (legacy) more dependency cleanups 2015-07-23 09:45:57 +00:00
Ad Schellevis
4075a285eb (legacy) move openvpn.inc out of interfaces.inc 2015-07-23 08:27:56 +00:00
Ad Schellevis
c55a7c50ed (legacy) remove services.inc dependency from interfaces.inc 2015-07-23 08:04:59 +00:00
Ad Schellevis
69af213b4a (legacy) move ipsec.inc dependency out of filter.inc 2015-07-23 07:26:47 +00:00
Ad Schellevis
465e699e71 (legacy) dependency cleanups related to functions.inc / interfaces.inc 2015-07-22 16:56:38 +00:00
Ad Schellevis
ea5dd43a31 (legacy) move pfsense-utils.inc dependency 2015-07-22 15:09:18 +00:00
Ad Schellevis
7f9910ee72 (legacy) move util.inc requires around 2015-07-22 08:19:00 +00:00
Ad Schellevis
d123345570 (legacy) work in progress require/include cleanup 2015-07-21 16:24:20 +00:00
Franco Fichtner
c8bc87f6ec src: remove stale shaper mentions 2015-07-02 00:08:32 +02:00
Franco Fichtner
22e0e257a2 queues: remove shaper.inc 2015-06-18 14:20:20 +02:00
Franco Fichtner
5427a3d654 rc: try refreshing php-cgi through SIGHUP instead 2015-04-01 11:19:47 +02:00
Franco Fichtner
5320fc92f9 rc: kill php-cgi to deal with moved includes 2015-04-01 08:36:23 +02:00
Franco Fichtner
9120b96675 globals: zap more unused or obsolete glue 2015-03-24 17:34:46 +01:00
Franco Fichtner
d178bd83e8 src: adapted more dormant debug code 2015-03-12 08:46:01 +01:00
Franco Fichtner
a47ad5e740 src: prune, prettify or zap scripts that use PHP shebang 2015-03-07 08:48:28 +01:00
Phil Davis
6b1ca069c0 Validation of y/n answers in setlanip
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
2015-01-11 10:04:40 +01:00
Phil Davis
e19ddeff25 rc.initial.setlanip fix validation of CIDR within range
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.
2015-01-11 10:02:47 +01:00
Phil Davis
8df5a57be5 Fixup dhcpd interface enabled check 2015-01-11 10:00:22 +01:00
Phil Davis
83d40310ac 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.
2015-01-11 09:58:08 +01:00
Phil Davis
d6516133c5 Set interface address from consol tidy output
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!
2015-01-11 09:55:07 +01:00
Franco Fichtner
a1f66881da rc: apply harmless whitespace changes 2014-12-28 20:19:53 +01:00
Franco Fichtner
727453c076 src: move all files (again)
Make "src" the implicit "/usr/local" so that nobody can
sneak in weird files in the base file system or potentially
overwrite them.

This is the last time, I swear...  :)
2014-12-10 16:42:39 +01:00