diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2008-07-07 21:36:34 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2008-07-07 21:36:34 +0000 |
commit | 424b758b99bca219b96b2fb7edf318c95c30bf43 (patch) | |
tree | 217a7e43e5522d714e45cf32805ae0977b3e910f /etc/rc.initial.setlanip | |
parent | 5493e30c5867cdbc26cb68f31d13d9c54db9adff (diff) | |
download | pfsense-424b758b99bca219b96b2fb7edf318c95c30bf43.zip pfsense-424b758b99bca219b96b2fb7edf318c95c30bf43.tar.gz |
Fix interface ip assignment. Originally commited by Ermal
Diffstat (limited to 'etc/rc.initial.setlanip')
-rwxr-xr-x | etc/rc.initial.setlanip | 11 |
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; |