From e604a9397fdeaf4cb6755da6296731be1a628d66 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Sun, 16 Apr 2023 08:35:21 +0200 Subject: [PATCH] interfaces: try to run the "fix" in the loop to make it "more reliable" This is practically impossible to get right the way mpd5/netgraph fail to deal with this on their own. --- src/etc/inc/interfaces.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/etc/inc/interfaces.inc b/src/etc/inc/interfaces.inc index 5c2d69ece..2e140f378 100644 --- a/src/etc/inc/interfaces.inc +++ b/src/etc/inc/interfaces.inc @@ -1268,6 +1268,9 @@ EOD; /* wait for up to 10 seconds for the interface to appear (ppp(oe)) */ $i = 0; while ($i < 10) { + /* appease netgraph by setting the correct node name */ + shell_safe('/usr/local/opnsense/scripts/interfaces/ppp-rename.sh %s %s %s', [$interface, $ifcfg['if'], $ppp['type']]); + exec("/sbin/ifconfig " . escapeshellarg($ppp['if']) . " 2>&1", $out, $ret); if ($ret == 0) { break; @@ -1275,9 +1278,6 @@ EOD; sleep(1); $i++; } - - /* appease netgraph by setting the correct node name */ - shell_safe('/usr/local/opnsense/scripts/interfaces/ppp-rename.sh %s %s %s', [$interface, $ifcfg['if'], $ppp['type']]); } function interfaces_carp_setup()