From a205d904b1cae9aaec884bece9fa0e91f3a2a22a Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Wed, 19 Oct 2005 15:55:52 +0000 Subject: [PATCH] MFC 7010 Only hold down boot while waiting on PPPOE to come up for a maximum of 30 seconds. --- etc/inc/interfaces.inc | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 4381c78061..aa696c10c2 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -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; }