diff options
author | smos <seth.mos@dds.nl> | 2011-08-18 12:10:17 +0200 |
---|---|---|
committer | smos <seth.mos@dds.nl> | 2011-08-18 12:10:17 +0200 |
commit | 302d646e9c256ec71b4b8fc4b928ff14f84d7fb9 (patch) | |
tree | e96881a98c5ef14db4fd354887e423469ffd10e1 | |
parent | 5a3031ea170c386e9240c2f5622ede590826bdcf (diff) | |
download | pfsense-302d646e9c256ec71b4b8fc4b928ff14f84d7fb9.zip pfsense-302d646e9c256ec71b4b8fc4b928ff14f84d7fb9.tar.gz |
Make sure to wait for the interface to be really created before letting the function return for PPP(oE) interfaces.
-rw-r--r-- | etc/inc/interfaces.inc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index cff2fd1..7d0d021 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -1671,6 +1671,15 @@ EOD; else setup_pppoe_reset_file($ppp['if']); } + /* wait for upto 10 seconds for the interface to appear (ppp(oe)) */ + $i = 0; + while($i < 10) { + exec("/sbin/ifconfig {$ppp['if']} 2>&1", $out, $ret); + if($ret == 0) + break; + sleep(1); + $i++; + } return 1; } |