Revision 4e6667b2
Added by Renato Botelho over 12 years ago
etc/inc/interfaces.inc | ||
---|---|---|
2694 | 2694 |
function find_rtsold_process($interface) { |
2695 | 2695 |
global $g; |
2696 | 2696 |
|
2697 |
if ($interface) { |
|
2698 |
if (isvalidpid("{$g['varrun_path']}/rtsold_{$interface}.pid")) |
|
2699 |
$pid = trim(file_get_contents("{$g['varrun_path']}/rtsold_{$interface}.pid"), " \n"); |
|
2700 |
else |
|
2701 |
return (false); |
|
2702 |
} else |
|
2697 |
if ($interface && isvalidpid("{$g['varrun_path']}/rtsold_{$interface}.pid")) |
|
2698 |
$pid = trim(file_get_contents("{$g['varrun_path']}/rtsold_{$interface}.pid"), " \n"); |
|
2699 |
else |
|
2703 | 2700 |
return(false); |
2704 | 2701 |
|
2705 | 2702 |
return intval($pid); |
... | ... | |
2708 | 2705 |
function find_dhcp6c_process($interface) { |
2709 | 2706 |
global $g; |
2710 | 2707 |
|
2711 |
if ($interface) { |
|
2712 |
if (isvalidpid("{$g['varrun_path']}/dhcp6c_{$interface}.pid")) |
|
2713 |
$pid = trim(file_get_contents("{$g['varrun_path']}/dhcp6c_{$interface}.pid"), " \n"); |
|
2714 |
else |
|
2715 |
retun (false); |
|
2716 |
} else |
|
2708 |
if ($interface && isvalidpid("{$g['varrun_path']}/dhcp6c_{$interface}.pid")) |
|
2709 |
$pid = trim(file_get_contents("{$g['varrun_path']}/dhcp6c_{$interface}.pid"), " \n"); |
|
2710 |
else |
|
2717 | 2711 |
return(false); |
2718 | 2712 |
|
2719 | 2713 |
return intval($pid); |
Also available in: Unified diff
Simplify a bit logic