diff options
author | smos <seth.mos@dds.nl> | 2012-05-23 16:24:18 +0200 |
---|---|---|
committer | smos <seth.mos@dds.nl> | 2012-05-23 16:24:47 +0200 |
commit | 7e631290b26172a9ca19d58c415f713761aa074b (patch) | |
tree | 1b40690b41f9965f0f456b3ea28a7d0eeba2a369 /etc | |
parent | b22fc825595effaaa7973775b08d86a4cf68f953 (diff) | |
download | pfsense-7e631290b26172a9ca19d58c415f713761aa074b.zip pfsense-7e631290b26172a9ca19d58c415f713761aa074b.tar.gz |
clean up old lock files for modem ports if a stale is left behind
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/interfaces.inc | 7 |
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"); |