pfsense/pfsense — pull request #1385 by phil-davis (2014-12-12 17:18:22+00:00)
Title: 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.
Tomorrow I will think about adding a last "Do you want to apply these changes?" question - it turns out to be a little more complicated to fixup the code to do that well.
Redmine issue #4100