clarify logs generated by newwanip(v6) when restarting packages, it's not only IP changes that end up here (by design).
Fixes #3941. When optimizations of the loops were made this brought the problems of overriding default gateway by dynamic interfaces. Try to stick to the first found for now!
Fixes #3938. Do more error checking.
Properly test if FCGI is calling or are being triggered from shell. Normally Fixes #3361
Properly test if FCGI is calling or are being triggered from shell. Normally Fixes #3361
Remove debugging code
Properly configure NAT Tranversal setting.
Correct dispaly of checkboxes for ipsec
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!
Merge pull request #1324 from phil-davis/patch-3
Add braces
Be consistent with the other pages
Indent better
Indent here as well
Merge pull request #1327 from wagonza/pfSense-master
Merge remote-tracking branch 'upstream/master'