summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/inc/interfaces.inc7
1 files changed, 6 insertions, 1 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index 612b914..e94b7f4 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -1324,7 +1324,7 @@ function interface_ppps_configure($interface) {
exec("/bin/mkdir -p /var/spool/lock");
exec("/bin/chmod a+rw /var/spool/lock/.");
}
- // mpd5 modem chat script expected in the same directory as the mpd_xxx.conf files
+ // mpd5 modem chat script expected in the same directory as the mpd_xxx.conf files
if (!file_exists("{$g['varetc_path']}/mpd.script"))
mwexec("/bin/ln -s /usr/local/sbin/mpd.script {$g['varetc_path']}/.");
@@ -1702,6 +1702,11 @@ EOD;
}
}
+ /* clean up old lock files */
+ foreach($ports as $port) {
+ unlink("{$g['var_path']}/spool/lock/LCK..{$port}");
+ }
+
/* fire up mpd */
mwexec("/usr/local/sbin/mpd5 -b -k -d {$g['varetc_path']} -f mpd_{$interface}.conf -p {$g['varrun_path']}/{$ppp['type']}_{$interface}.pid -s ppp {$ppp['type']}client");
OpenPOWER on IntegriCloud