summaryrefslogtreecommitdiffstats
path: root/etc/rc.initial.setlanip
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2008-07-02 18:11:35 +0000
committerErmal Luçi <eri@pfsense.org>2008-07-02 18:11:35 +0000
commitbba3a775d45c9334528e6bd76c0d24e32c4f5054 (patch)
tree4c48b48b396b8ab56f4dfbcb61f459a878f55640 /etc/rc.initial.setlanip
parent51b84146abb1a87518525f03e0abfd3149848598 (diff)
downloadpfsense-bba3a775d45c9334528e6bd76c0d24e32c4f5054.zip
pfsense-bba3a775d45c9334528e6bd76c0d24e32c4f5054.tar.gz
Missed interface improvements commit.
Diffstat (limited to 'etc/rc.initial.setlanip')
-rwxr-xr-xetc/rc.initial.setlanip16
1 files changed, 3 insertions, 13 deletions
diff --git a/etc/rc.initial.setlanip b/etc/rc.initial.setlanip
index 720aab2..330042d 100755
--- a/etc/rc.initial.setlanip
+++ b/etc/rc.initial.setlanip
@@ -59,18 +59,8 @@
$addr_blank = false;
/* build an interface collection */
- $ifdescrs = array ("wan");
- if($config['interfaces']['lan']) {
- $ifdescrs[] = "lan";
- }
- for ($j = 0; 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++;
- // increment for wan
- $j++;
+ $ifdescrs = get_configured_interface_with_descr();
+ $j = count($ifdescrs);
/* grab interface that we will operate on, unless there is only one
interface */
@@ -78,7 +68,7 @@
echo "Available interfaces:\n\n";
$x=1;
foreach($ifdescrs as $iface) {
- echo "{$x} - " . strtoupper($iface) . "\n";
+ echo "{$x} - {$iface}\n";
$x++;
}
echo "\nEnter the number of the interface you wish to configure: ";
OpenPOWER on IntegriCloud