summaryrefslogtreecommitdiffstats
path: root/etc/inc/interfaces.inc
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2013-03-19 17:06:01 -0300
committerRenato Botelho <garga@FreeBSD.org>2013-03-19 17:06:01 -0300
commit4e6667b2197f2f99b7a9b70c9a47df7029adb3d4 (patch)
tree65b2cd4f32710fe9d9f3e012fca82e93f43d431d /etc/inc/interfaces.inc
parente5a27e16bfd6957016ad9cc8d532d60b4f90f05f (diff)
downloadpfsense-4e6667b2197f2f99b7a9b70c9a47df7029adb3d4.zip
pfsense-4e6667b2197f2f99b7a9b70c9a47df7029adb3d4.tar.gz
Simplify a bit logic
Diffstat (limited to 'etc/inc/interfaces.inc')
-rw-r--r--etc/inc/interfaces.inc18
1 files changed, 6 insertions, 12 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index 50c4cb9..97b8c08 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -2694,12 +2694,9 @@ function find_dhclient_process($interface) {
function find_rtsold_process($interface) {
global $g;
- if ($interface) {
- if (isvalidpid("{$g['varrun_path']}/rtsold_{$interface}.pid"))
- $pid = trim(file_get_contents("{$g['varrun_path']}/rtsold_{$interface}.pid"), " \n");
- else
- return (false);
- } else
+ if ($interface && isvalidpid("{$g['varrun_path']}/rtsold_{$interface}.pid"))
+ $pid = trim(file_get_contents("{$g['varrun_path']}/rtsold_{$interface}.pid"), " \n");
+ else
return(false);
return intval($pid);
@@ -2708,12 +2705,9 @@ function find_rtsold_process($interface) {
function find_dhcp6c_process($interface) {
global $g;
- if ($interface) {
- if (isvalidpid("{$g['varrun_path']}/dhcp6c_{$interface}.pid"))
- $pid = trim(file_get_contents("{$g['varrun_path']}/dhcp6c_{$interface}.pid"), " \n");
- else
- retun (false);
- } else
+ if ($interface && isvalidpid("{$g['varrun_path']}/dhcp6c_{$interface}.pid"))
+ $pid = trim(file_get_contents("{$g['varrun_path']}/dhcp6c_{$interface}.pid"), " \n");
+ else
return(false);
return intval($pid);
OpenPOWER on IntegriCloud