summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2010-03-03 18:16:22 +0000
committerErmal Luçi <eri@pfsense.org>2010-03-03 18:16:22 +0000
commit79d3a7cf2ccd62cf340c5d811fe675106bc547cc (patch)
treef9a54839c892fd905bdfbe3604320ccbd3663c26 /etc
parent9c6db17a5d3199bbb38956e1b213872eabca2091 (diff)
downloadpfsense-79d3a7cf2ccd62cf340c5d811fe675106bc547cc.zip
pfsense-79d3a7cf2ccd62cf340c5d811fe675106bc547cc.tar.gz
Ticket #259. Retrun only the first pid from the list that might be found. This should fix not killed dhclient processes.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/interfaces.inc5
1 files changed, 4 insertions, 1 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index c627ac0..231163a 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -1738,8 +1738,11 @@ function kill_wpasupplicant($interface) {
}
function find_dhclient_process($interface) {
- if($interface)
+ if($interface) {
$pid = `ps awwwux | grep dhclient | grep -v grep | grep {$interface} | awk '{ print \$2 }'`;
+ $pid = explode("\n", $pid);
+ $pid = $pid[0];
+ }
return $pid;
}
OpenPOWER on IntegriCloud