Only hold down boot while waiting on PPPOE to come up for a maximum of 30 seconds.
This commit is contained in:
Scott Ullrich 2005-10-19 15:55:52 +00:00
parent 56afcab6da
commit a205d904b1

View File

@ -1046,12 +1046,15 @@ EOD;
/* fire up mpd */
mwexec("/usr/local/sbin/mpd -b -d {$g['varetc_path']} -p {$g['varrun_path']}/mpd.pid pppoe");
/* sleep until wan is up */
while(!file_exists("{$g['tmp_path']}/wanup")) {
sleep(1);
}
unlink_if_exists("{$g['tmp_path']}/wanup");
/* sleep until wan is up - or 30 seconds, whichever comes first */
for ($count = 0; $count < 30; $count++) {
if(file_exists("{$g['tmp_path']}/wanup")) {
break;
}
sleep(1);
}
unlink_if_exists("{$g['tmp_path']}/wanup");
return 0;
}