From 58cbe016de8cd2e88b08529f6272da849251647a Mon Sep 17 00:00:00 2001 From: gnhb Date: Tue, 8 Jun 2010 22:06:51 +0700 Subject: [PATCH] Trim the output. This only nails you if your interface is last in the list. --- etc/inc/interfaces.inc | 2 +- etc/inc/pfsense-utils.inc | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 7ade954a13..832797cb67 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -62,7 +62,7 @@ function get_interface_arr($flush = false) { /* If the cache doesn't exist, build it */ if (!isset($interface_arr_cache) or $flush) - $interface_arr_cache = explode(" ", `/sbin/ifconfig -l`); + $interface_arr_cache = explode(" ", trim(`/sbin/ifconfig -l`)); return $interface_arr_cache; } diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index 03d4968f6e..2f808bfa2e 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -1147,7 +1147,6 @@ function convert_seconds_to_hms($sec){ } /* Compute the total uptime from the ppp uptime log file in the conf directory */ -/* Written by: gnoahb@gmail.com */ function get_ppp_uptime($port){ if (file_exists("/conf/{$port}.log")){