summaryrefslogtreecommitdiffstats
path: root/etc/rc.initial.setlanip
diff options
context:
space:
mode:
authorBill Marquette <billm@pfsense.org>2007-10-19 19:17:59 +0000
committerBill Marquette <billm@pfsense.org>2007-10-19 19:17:59 +0000
commit78e63d6497e99b2d5de38e8e507f85221a660636 (patch)
treee51b48002efd5b45ced2e4a4fc7396e4cff2f164 /etc/rc.initial.setlanip
parentd173230c708d56ee9857dfff84779be36194d05d (diff)
downloadpfsense-78e63d6497e99b2d5de38e8e507f85221a660636.zip
pfsense-78e63d6497e99b2d5de38e8e507f85221a660636.tar.gz
Ticket #1464, only allow y* or n*
Diffstat (limited to 'etc/rc.initial.setlanip')
-rwxr-xr-xetc/rc.initial.setlanip22
1 files changed, 17 insertions, 5 deletions
diff --git a/etc/rc.initial.setlanip b/etc/rc.initial.setlanip
index cf8ecc9..5d55444 100755
--- a/etc/rc.initial.setlanip
+++ b/etc/rc.initial.setlanip
@@ -62,9 +62,15 @@
$config['interfaces']['lan']['ipaddr'] = $lanip;
$config['interfaces']['lan']['subnet'] = $lanbits;
- echo "\nDo you want to enable the DHCP server on LAN [y|n]? ";
-
- if (strcasecmp(chop(fgets($fp)), "y") == 0) {
+ do {
+ $good = false;
+ echo "\nDo you want to enable the DHCP server on LAN [y|n]? ";
+ $yn = strtolower(chop(fgets($fp)));
+ if ($yn[0] == "y" or $yn[0] == "n")
+ $good = true;
+ } while (!$good);
+
+ if ($yn == "y") {
do {
echo "Enter the start address of the client address range: ";
$dhcpstartip = chop(fgets($fp));
@@ -92,9 +98,15 @@
if ($config['system']['webgui']['protocol'] == "https") {
- echo "\nDo you want to revert to HTTP as the webConfigurator protocol? (y/n) ";
+ do {
+ $good = false;
+ echo "\nDo you want to revert to HTTP as the webConfigurator protocol? (y/n) ";
+ $yn = strtolower(chop(fgets($fp)));
+ if ($yn[0] == "y" or $yn[0] == "n")
+ $good = true;
+ } while (!$good);
- if (strcasecmp(chop(fgets($fp)), "y") == 0)
+ if ($yn == "y")
$config['system']['webgui']['protocol'] = "http";
}
OpenPOWER on IntegriCloud