From faab50d4a24cdd4f614813a2ba110554d8be4f74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ermal=20Lu=C3=A7i?= Date: Mon, 8 Dec 2008 13:51:38 +0000 Subject: [PATCH] Fix the {interface}up checks. --- etc/inc/interfaces.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index f772b18e01..23a5ca6b54 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -602,7 +602,7 @@ function interface_bring_down($interface = "wan", $destroy = false) { mwexec("/usr/sbin/arp -d -i {$realif} -a"); /* remove interface up file if it exists */ - unlink_if_exists("{$g['tmp_path']}/{$interface}up"); + unlink_if_exists("{$g['tmp_path']}/{$realif}up"); unlink_if_exists("{$g['vardb_path']}/{$interface}ip"); //unlink_if_exists("{$g['varetc_path']}/nameservers.conf"); @@ -1628,13 +1628,13 @@ EOD; /* sleep until wan is up - or 30 seconds, whichever comes first */ for ($count = 0; $count < 30; $count++) { - if(file_exists("{$g['tmp_path']}/{$interface}up")) { + if(file_exists("{$g['tmp_path']}/{$realif}up")) { break; } sleep(1); } - unlink_if_exists("{$g['tmp_path']}/{$interface}up"); + unlink_if_exists("{$g['tmp_path']}/{$realif}up"); return 0; }