diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-02-12 02:59:15 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-02-12 02:59:15 +0000 |
commit | bbc3533ff7215393cbe15ef7821abcfe0bee1b72 (patch) | |
tree | 6bf64e1f6ea502524c4b8a438b4e9511bf994126 /etc/rc.initial.setlanip | |
parent | 263666bdf983ddf268c160c1441b2e32a12c6bc4 (diff) | |
download | pfsense-bbc3533ff7215393cbe15ef7821abcfe0bee1b72.zip pfsense-bbc3533ff7215393cbe15ef7821abcfe0bee1b72.tar.gz |
Style clieanup.
Diffstat (limited to 'etc/rc.initial.setlanip')
-rwxr-xr-x | etc/rc.initial.setlanip | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/etc/rc.initial.setlanip b/etc/rc.initial.setlanip index 99fd922..c75b9f2 100755 --- a/etc/rc.initial.setlanip +++ b/etc/rc.initial.setlanip @@ -3,20 +3,20 @@ /* rc.initial.setlanip part of m0n0wall (http://m0n0.ch/wall) - + Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>. All rights reserved. - + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE @@ -32,9 +32,9 @@ /* parse the configuration and include all functions used below */ require_once("config.inc"); require_once("functions.inc"); - + $fp = fopen('php://stdin', 'r'); - + do { echo "\nEnter the new LAN IP address: "; $lanip = chop(fgets($fp)); @@ -47,7 +47,7 @@ echo "e.g. 255.255.255.0 = 24\n"; echo " 255.255.0.0 = 16\n"; echo " 255.0.0.0 = 8\n\n"; - + do { echo "Enter the new LAN subnet bit count: "; $lanbits = chop(fgets($fp)); @@ -55,12 +55,12 @@ exit(0); } } while (!is_numeric($lanbits) || ($lanbits < 1) || ($lanbits > 31)); - + $config['interfaces']['lan']['ipaddr'] = $lanip; $config['interfaces']['lan']['subnet'] = $lanbits; - - echo "\nDo you want to enable the DHCP server on LAN? (y/n) "; - + + echo "\nDo you want to enable the DHCP server on LAN [y|n]? "; + if (strcasecmp(chop(fgets($fp)), "y") == 0) { do { echo "Enter the start address of the client address range: "; @@ -69,7 +69,7 @@ exit(0); } } while (!is_ipaddr($dhcpstartip)); - + do { echo "Enter the end address of the client address range: "; $dhcpendip = chop(fgets($fp)); @@ -77,32 +77,32 @@ exit(0); } } while (!is_ipaddr($dhcpendip)); - + $config['dhcpd']['lan']['enable'] = true; $config['dhcpd']['lan']['range']['from'] = $dhcpstartip; $config['dhcpd']['lan']['range']['to'] = $dhcpendip; } else { unset($config['dhcpd']['lan']['enable']); } - + if ($config['system']['webgui']['protocol'] == "https") { - + echo "\nDo you want to revert to HTTP as the webGUI protocol? (y/n) "; - + if (strcasecmp(chop(fgets($fp)), "y") == 0) $config['system']['webgui']['protocol'] = "http"; } - + if (isset($config['system']['webgui']['noantilockout'])) { echo "\nNote: the anti-lockout rule on LAN has been re-enabled.\n"; unset($config['system']['webgui']['noantilockout']); } - + write_config(); interfaces_lan_configure(); - + echo <<<EOD - + The LAN IP address has been set to $lanip/$lanbits. You can now access the webGUI by opening the following URL in your browser: |