From bcfe4ae5add1ca60e35151e225fa207f6160efd7 Mon Sep 17 00:00:00 2001 From: Ermal Date: Wed, 19 Jan 2011 18:25:26 +0000 Subject: Ticket #259 trim the \n from the command output and return only the numeric part of it. --- etc/inc/interfaces.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 97b59d8..a414bd7 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -952,7 +952,7 @@ function interface_bring_down($interface = "wan", $destroy = false) { case "dhcp": $pid = find_dhclient_process($realif); if($pid) - mwexec("kill {$pid}"); + mwexec("/bin/kill {$pid}"); sleep(1); unlink_if_exists("{$g['varetc_path']}/dhclient_{$interface}.conf"); if(does_interface_exist("$realif")) { @@ -2451,7 +2451,7 @@ function find_dhclient_process($interface) { else $pid = 0; - return $pid; + return intval($pid); } function interface_configure($interface = "wan", $reloadall = false, $linkupevent = false) { -- cgit v1.1