mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-17 01:54:49 +00:00
interfaces: loosely related cleanups #2707
This commit is contained in:
parent
446c68157f
commit
3bb0e00e19
@ -1171,9 +1171,6 @@ function interface_ppps_configure($interface)
|
||||
return 0;
|
||||
}
|
||||
|
||||
// mpd5 requires a /var/spool/lock directory for PPP modem links.
|
||||
@mkdir("/var/spool/lock", 0777, true);
|
||||
|
||||
// mpd5 modem chat script expected in the same directory as the mpd_xxx.conf files
|
||||
if (!file_exists('/var/etc/mpd.script')) {
|
||||
symlink('/usr/local/sbin/mpd.script', '/var/etc/mpd.script');
|
||||
|
||||
@ -231,11 +231,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
|
||||
$ppp['mru'] = implode(',', $port_data['mru']);
|
||||
$ppp['mrru'] = implode(',', $port_data['mrru']);
|
||||
|
||||
// XXX this was already in here, but is probably not the correct place to create this
|
||||
if (!is_dir('/var/spool/lock')) {
|
||||
mwexec('/bin/mkdir -p /var/spool/lock');
|
||||
}
|
||||
|
||||
if (isset($id)) {
|
||||
$a_ppps[$id] = $ppp;
|
||||
} else {
|
||||
@ -243,11 +238,14 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
|
||||
}
|
||||
|
||||
write_config();
|
||||
|
||||
$iflist = get_configured_interface_with_descr();
|
||||
foreach ($iflist as $pppif => $ifdescr) {
|
||||
if ($config['interfaces'][$pppif]['if'] == $ppp['if'])
|
||||
interface_ppps_configure($pppif);
|
||||
if ($config['interfaces'][$pppif]['if'] == $ppp['if']) {
|
||||
interface_ppps_configure($pppif);
|
||||
}
|
||||
}
|
||||
|
||||
header(url_safe('Location: /interfaces_ppps.php'));
|
||||
exit;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user