Revision 302d646e
Added by Seth Mos almost 14 years ago
etc/inc/interfaces.inc | ||
---|---|---|
1671 | 1671 |
else |
1672 | 1672 |
setup_pppoe_reset_file($ppp['if']); |
1673 | 1673 |
} |
1674 |
/* wait for upto 10 seconds for the interface to appear (ppp(oe)) */ |
|
1675 |
$i = 0; |
|
1676 |
while($i < 10) { |
|
1677 |
exec("/sbin/ifconfig {$ppp['if']} 2>&1", $out, $ret); |
|
1678 |
if($ret == 0) |
|
1679 |
break; |
|
1680 |
sleep(1); |
|
1681 |
$i++; |
|
1682 |
} |
|
1674 | 1683 |
|
1675 | 1684 |
return 1; |
1676 | 1685 |
} |
Also available in: Unified diff
Make sure to wait for the interface to be really created before letting the function return for PPP interfaces.