summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-08-10 21:35:20 +0000
committerErmal <eri@pfsense.org>2010-08-10 21:35:20 +0000
commit8d9cbe6ff3ba430a3354d3df100ed54bf1031507 (patch)
tree6c468c108ed01fffc24b79fa59637616161fb01e /etc
parentfd9ba7c09f01aaa1ae50bc15e918c05b024f4f36 (diff)
downloadpfsense-8d9cbe6ff3ba430a3354d3df100ed54bf1031507.zip
pfsense-8d9cbe6ff3ba430a3354d3df100ed54bf1031507.tar.gz
Fixes #684. Test file existence before trying to kill the process. Also correct interface name passed as parameter to interface_configure function, it should fix another ticket as a byproduct.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/interfaces.inc8
1 files changed, 5 insertions, 3 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index 5196205..d10f322 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -824,11 +824,13 @@ function interface_bring_down($interface = "wan", $destroy = false) {
if (is_array($config['ppps']['ppp']) && count($config['ppps']['ppp'])) {
foreach ($config['ppps']['ppp'] as $pppid => $ppp) {
if ($realif == $ppp['if']) {
- killbypid("{$g['varrun_path']}/{$ifcfg['ipaddr']}_{$interface}.pid");
- sleep(2);
+ if (file_exists("{$g['varrun_path']}/{$ifcfg['ipaddr']}_{$interface}.pid")) {
+ killbypid("{$g['varrun_path']}/{$ifcfg['ipaddr']}_{$interface}.pid");
+ sleep(2);
+ }
unlink_if_exists("{$g['varetc_path']}/mpd_{$interface}.conf");
if (isset($ppp['ondemand']) && !$destroy) {
- interface_configure("wan");
+ interface_configure($interface);
}
break;
}
OpenPOWER on IntegriCloud