Revision e503c44a
Added by Ermal LUÇI over 14 years ago
etc/inc/config.console.inc | ||
---|---|---|
319 | 319 |
|
320 | 320 |
if (in_array($key, array('y', 'Y'))) { |
321 | 321 |
if($lanif) { |
322 |
if (!is_array($config['interfaces']['lan'])) |
|
323 |
$config['interfaces']['lan'] = array(); |
|
322 | 324 |
$config['interfaces']['lan']['if'] = $lanif; |
323 | 325 |
$config['interfaces']['lan']['enable'] = true; |
324 | 326 |
} elseif (!$g['booting'] && !$auto_assign) { |
... | ... | |
332 | 334 |
EODD; |
333 | 335 |
|
334 | 336 |
if (strcasecmp(chop(fgets($fp)), "y") == 0) { |
335 |
if($config['interfaces']['lan']['if']) |
|
337 |
if(isset($config['interfaces']['lan']) && $config['interfaces']['lan']['if'])
|
|
336 | 338 |
mwexec("/sbin/ifconfig " . $config['interfaces']['lan']['if'] . " delete"); |
337 | 339 |
} |
338 | 340 |
if(isset($config['interfaces']['lan'])) |
... | ... | |
372 | 374 |
(!is_array($config['interfaces']['lan']['wireless']))) |
373 | 375 |
$config['interfaces']['lan']['wireless'] = array(); |
374 | 376 |
} else { |
375 |
unset($config['interfaces']['lan']['wireless']); |
|
377 |
if (isset($config['interfaces']['lan'])) |
|
378 |
unset($config['interfaces']['lan']['wireless']); |
|
376 | 379 |
} |
377 | 380 |
|
381 |
if (!is_array($config['interfaces']['wan'])) |
|
382 |
$config['interfaces']['wan'] = array(); |
|
378 | 383 |
$config['interfaces']['wan']['if'] = $wanif; |
379 | 384 |
$config['interfaces']['wan']['enable'] = true; |
380 | 385 |
if (preg_match($g['wireless_regex'], $wanif)) { |
... | ... | |
382 | 387 |
(!is_array($config['interfaces']['wan']['wireless']))) |
383 | 388 |
$config['interfaces']['wan']['wireless'] = array(); |
384 | 389 |
} else { |
385 |
unset($config['interfaces']['wan']['wireless']); |
|
390 |
if (isset($config['interfaces']['wan'])) |
|
391 |
unset($config['interfaces']['wan']['wireless']); |
|
386 | 392 |
} |
387 | 393 |
|
388 | 394 |
for ($i = 0; $i < count($optif); $i++) { |
... | ... | |
420 | 426 |
|
421 | 427 |
$g['booting'] = false; |
422 | 428 |
|
423 |
/* XXX: ermal - disable it for now this is used during bootup at best so shouldn't be needed. |
|
424 |
* For now just comment it out and later remove it completely. |
|
425 |
* resync everything |
|
426 |
reload_all_sync(); |
|
427 |
*/ |
|
428 |
|
|
429 | 429 |
echo " done!\n"; |
430 | 430 |
|
431 | 431 |
touch("{$g['tmp_path']}/assign_complete"); |
... | ... | |
535 | 535 |
} |
536 | 536 |
} |
537 | 537 |
|
538 |
?> |
|
538 |
?> |
Also available in: Unified diff
Add some more safe belts and remove code that is commented from long time now. Reported on http://forum.pfsense.org/index.php/topic,28202.15.html