interfaces: one hit and miss and a consistency change for previous

$interface isn't the device. Also use ifcfg['if'] rather than one
single stray ppp['if'] at the end of this function.
This commit is contained in:
Franco Fichtner 2024-08-12 12:49:35 +02:00
parent d8de758d04
commit 4b77d13eef

View File

@ -1334,7 +1334,7 @@ EOD;
}
/* precaution for post-start 'up' check */
legacy_interface_flags($interface, 'down', false);
legacy_interface_flags($ifcfg['if'], 'down', false);
/* fire up mpd */
mwexecf(
@ -1350,7 +1350,7 @@ EOD;
$i = 0;
while ($i < $max) {
sleep(1);
if (does_interface_exist($ppp['if'], 'up')) {
if (does_interface_exist($ifcfg['if'], 'up')) {
break;
}
$i++;