diff options
author | Ermal Luçi <eri@pfsense.org> | 2010-03-03 18:16:22 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2010-03-03 18:16:22 +0000 |
commit | 79d3a7cf2ccd62cf340c5d811fe675106bc547cc (patch) | |
tree | f9a54839c892fd905bdfbe3604320ccbd3663c26 | |
parent | 9c6db17a5d3199bbb38956e1b213872eabca2091 (diff) | |
download | pfsense-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.
-rw-r--r-- | etc/inc/interfaces.inc | 5 |
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; } |