From bba3a775d45c9334528e6bd76c0d24e32c4f5054 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ermal=20Lu=C3=A7i?= Date: Wed, 2 Jul 2008 18:11:35 +0000 Subject: Missed interface improvements commit. --- etc/rc.initial.setlanip | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'etc/rc.initial.setlanip') 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: "; -- cgit v1.1