summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2011-06-21 07:08:05 +0000
committerErmal <eri@pfsense.org>2011-06-21 07:08:05 +0000
commit7cca77de28652ca92a901be6da2e8ad86259ce16 (patch)
tree95d066ee17581aa40003dde806811b8cf3297da4 /etc
parent5b9afe1e797362e932c21f929fdb77dcfef44d17 (diff)
downloadpfsense-7cca77de28652ca92a901be6da2e8ad86259ce16.zip
pfsense-7cca77de28652ca92a901be6da2e8ad86259ce16.tar.gz
Kill olsrd if it is not enabled. Reported-by: http://forum.pfsense.org/index.php/topic,37931.0.html
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/services.inc7
1 files changed, 5 insertions, 2 deletions
diff --git a/etc/inc/services.inc b/etc/inc/services.inc
index d5c9ada..6913498 100644
--- a/etc/inc/services.inc
+++ b/etc/inc/services.inc
@@ -978,8 +978,11 @@ function setup_wireless_olsr() {
conf_mount_rw();
foreach($config['installedpackages']['olsrd']['config'] as $olsrd) {
$olsr_enable = $olsrd['enable'];
- if($olsr_enable <> "on")
+ if($olsr_enable <> "on") {
+ if (is_process_running("olsrd"))
+ mwexec("/usr/bin/killall olsrd", true);
return;
+ }
$fd = fopen("{$g['varetc_path']}/olsr.conf", "w");
if($olsrd['announcedynamicroute'] or $olsrd['enableannounce'] == "on") {
@@ -1241,7 +1244,7 @@ EODAD;
fclose($fd);
}
- if(is_process_running("olsrd"))
+ if (is_process_running("olsrd"))
mwexec("/usr/bin/killall olsrd", true);
sleep(2);
OpenPOWER on IntegriCloud