mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-16 01:24:38 +00:00
interfaces: configure ondemand ppp in background
The history of this dates back to m0n0wall and it seems what this tries to achieve is restarting an instance of mpd that will dial on demand later on so the idea is to start the service when deconfiguring it. That might seem "clear" but structurally there's no reason to run a single shot configure during interface disable step (likely through rc.linkup stop).
This commit is contained in:
parent
3ccd2f0bdf
commit
b899fa356a
@ -1032,13 +1032,11 @@ function interface_bring_down($interface = "wan", $ifacecfg = false)
|
||||
if (!empty($ppps)) {
|
||||
foreach ($ppps as $ppp) {
|
||||
if ($ifcfg['if'] == $ppp['if']) {
|
||||
/* XXX $ifacecfg is very likely never false */
|
||||
if (isset($ppp['ondemand']) && $ifacecfg === false) {
|
||||
configdp_run('interface reconfigure', array($interface));
|
||||
configdp_run('interface reconfigure', [$interface], true);
|
||||
break;
|
||||
}
|
||||
killbypid("/var/run/{$ppp['type']}_{$interface}.pid", 'TERM', true);
|
||||
@unlink("/var/etc/mpd_{$interface}.conf");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user