summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-02-16 02:26:15 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-02-16 02:26:15 +0000
commit534334ba9b0a029fc8c4263b4e5cc0f6c37d7c71 (patch)
tree374f90f8c573c3d8a889688b88e28b1f9087ef29
parent5b6cc0c48c609cc79d68bf3fe3266dbde3c0b3a3 (diff)
downloadpfsense-534334ba9b0a029fc8c4263b4e5cc0f6c37d7c71.zip
pfsense-534334ba9b0a029fc8c4263b4e5cc0f6c37d7c71.tar.gz
Make set wan/lan/optX script usable.
-rwxr-xr-xetc/rc.initial.setlanip17
1 files changed, 11 insertions, 6 deletions
diff --git a/etc/rc.initial.setlanip b/etc/rc.initial.setlanip
index 8cdc3f8..f55ccbb 100755
--- a/etc/rc.initial.setlanip
+++ b/etc/rc.initial.setlanip
@@ -39,13 +39,18 @@
/* build an interface collection */
$ifdescrs = array ("wan");
- if($config['interfaces']['lan'])
- $ifdescrs = array ("lan");
+ if($config['interfaces']['lan']) {
+ $ifdescrs[] = "lan";
+ }
for ($j = 1; isset ($config['interfaces']['opt' . $j]); $j++) {
if(isset($config['interfaces']['opt' . $j]['enable']))
$ifdescrs['opt' . $j] = filter_get_opt_interface_descr("opt" . $j);
}
-
+ if($config['interfaces']['lan'])
+ $j++;
+ // incriment for wan
+ $j++;
+
/* grab interface that we will operate on */
echo "Available interfaces:\n\n";
$x=1;
@@ -61,7 +66,7 @@
if($intnum > $j)
exit;
- $interface = $ifdescrs[$intnum];
+ $interface = $ifdescrs[$intnum-1];
if(!$interface) {
echo "Invalid interface!\n";
exit;
@@ -180,9 +185,9 @@
interfaces_lan_configure();
if ($intip != '') {
- echo "\n\n" . gettext('The IPv4 {$interface} address has been set to ') . "{$intip}/{$intbits}\n" ;
+ echo "\n\n" . gettext("The IPv4 {$interface} address has been set to ") . "{$intip}/{$intbits}\n" ;
echo gettext('You can now access the webConfigurator by opening the following URL in your web browser:') . "\n";
- echo "{$config['system']['webgui']['protocol']}://{$intip}/\n";
+ echo " {$config['system']['webgui']['protocol']}://{$intip}/\n";
}
echo "\n" . gettext('Press <ENTER> to continue.');
OpenPOWER on IntegriCloud