summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorEspen Johansen <lsf@pfsense.org>2005-09-28 00:48:34 +0000
committerEspen Johansen <lsf@pfsense.org>2005-09-28 00:48:34 +0000
commit387041ffc4bd81bbd2bbae3acaae68a7f0b657df (patch)
tree0986802409c54afc37b0077926c2078a4e087f94 /etc
parente556dea72cedc320853ede7f5ad8edd66f80a531 (diff)
downloadpfsense-387041ffc4bd81bbd2bbae3acaae68a7f0b657df.zip
pfsense-387041ffc4bd81bbd2bbae3acaae68a7f0b657df.tar.gz
Let ifconfig changes happen after hostapd is killed.
No more sighup hostapd as this seems to create problems.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/interfaces.inc11
1 files changed, 8 insertions, 3 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index 4147d5d..99f5a84 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -518,8 +518,10 @@ EOD;
fwrite($fd, "{$wpa}");
fclose($fd);
if(is_process_running("hostapd")) {
- mwexec("$killall -HUP hostapd");
- } else {
+ mwexec("$killall -KILL hostapd");
+ sleep(2);
+ mwexec("$hostapd -B {$g['tmp_path']}/hostapd_{$if}.conf");
+ } else {
mwexec("$hostapd -B {$g['tmp_path']}/hostapd_{$if}.conf");
}
}
@@ -581,10 +583,13 @@ EOD;
mwexec($ifconfig . $if . " down");
+ mwexec("$killall -KILL hostapd");
mwexec($ifconfig . $ifcargs);
mwexec($ifconfig . " up");
+ sleep(1);
+ mwexec("$hostapd -B {$g['tmp_path']}/hostapd_{$if}.conf");
-
+ /* Write ifconfig settings to tmp file so we can see if user set something weird */
$fd = fopen("{$g['tmp_path']}/ifconfig_wireless", "w");
fwrite($fd, "/sbin/ifconfig {$ifcargs}");
fclose($fd);
OpenPOWER on IntegriCloud