summaryrefslogtreecommitdiffstats
path: root/etc/rc.initial.setlanip
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-07-07 21:36:34 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-07-07 21:36:34 +0000
commit424b758b99bca219b96b2fb7edf318c95c30bf43 (patch)
tree217a7e43e5522d714e45cf32805ae0977b3e910f /etc/rc.initial.setlanip
parent5493e30c5867cdbc26cb68f31d13d9c54db9adff (diff)
downloadpfsense-424b758b99bca219b96b2fb7edf318c95c30bf43.zip
pfsense-424b758b99bca219b96b2fb7edf318c95c30bf43.tar.gz
Fix interface ip assignment. Originally commited by Ermal
Diffstat (limited to 'etc/rc.initial.setlanip')
-rwxr-xr-xetc/rc.initial.setlanip11
1 files changed, 10 insertions, 1 deletions
diff --git a/etc/rc.initial.setlanip b/etc/rc.initial.setlanip
index 330042d..a6b4215 100755
--- a/etc/rc.initial.setlanip
+++ b/etc/rc.initial.setlanip
@@ -77,13 +77,22 @@
$intnum = $j;
}
-
if($intnum < 1)
exit;
if($intnum > $j)
exit;
$interface = $ifdescrs[$intnum-1];
+ $interface = $ifdescrs[$intnum-1];
+ $index = 1;
+ foreach ($ifdescrs as $ifname => $ifdesc) {
+ if ($intnum == $index) {
+ $interface = $ifname;
+ break;
+ } else {
+ $index++;
+ }
+ }
if(!$interface) {
echo "Invalid interface!\n";
exit;
OpenPOWER on IntegriCloud