summaryrefslogtreecommitdiffstats
path: root/etc/inc/pfsense-utils.inc
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2014-02-03 11:43:38 -0200
committerRenato Botelho <garga@FreeBSD.org>2014-02-04 12:34:41 -0200
commit306f8556105ecf037e6d5ac46d346b47951d3321 (patch)
tree2e38002295782b46680e84d62c2f75358bc0d929 /etc/inc/pfsense-utils.inc
parentf17771745918a068950c6a4536b807f37464f02b (diff)
downloadpfsense-306f8556105ecf037e6d5ac46d346b47951d3321.zip
pfsense-306f8556105ecf037e6d5ac46d346b47951d3321.tar.gz
Simplify logic
Diffstat (limited to 'etc/inc/pfsense-utils.inc')
-rw-r--r--etc/inc/pfsense-utils.inc8
1 files changed, 4 insertions, 4 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 90e2743..a1e8460 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -344,10 +344,10 @@ function get_carp_interface_status($carpinterface) {
* get_pfsync_interface_status($pfsyncinterface): returns the status of a pfsync
*/
function get_pfsync_interface_status($pfsyncinterface) {
- $result = does_interface_exist($pfsyncinterface);
- if($result <> true) return;
- $status = exec_command("/sbin/ifconfig {$pfsyncinterface} | /usr/bin/awk '/pfsync:/ {print \$5}'");
- return $status;
+ if (!does_interface_exist($pfsyncinterface))
+ return;
+
+ return exec_command("/sbin/ifconfig {$pfsyncinterface} | /usr/bin/awk '/pfsync:/ {print \$5}'");
}
/*
OpenPOWER on IntegriCloud