From f2d5c538a578cb59c7705fea85f4315bef975da6 Mon Sep 17 00:00:00 2001 From: jim-p Date: Tue, 19 Jun 2012 09:45:16 -0400 Subject: Fix trailing whitespace --- etc/inc/pkg-utils.inc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'etc/inc/pkg-utils.inc') diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc index cf06694..696c13c 100644 --- a/etc/inc/pkg-utils.inc +++ b/etc/inc/pkg-utils.inc @@ -518,11 +518,12 @@ function pkg_fetch_recursive($pkgname, $filename, $dependlevel = 0, $base_url = $fetchdir = $g['tmp_path']; } - /* FreeBSD has no PBI's hosted, so fall back to our own URL for now. (Maybe fail to PC-BSD?) */ - $arch = php_uname("m"); - $arch = ($arch == "i386") ? "" : $arch . '/'; - $rel = get_freebsd_version(); - $priv_url = "http://files.pfsense.org/packages/{$arch}{$rel}/All/"; + $osname = php_uname("s"); + $arch = php_uname("m"); + $rel = strtolower(php_uname("r")); + if (substr_count($rel, '-') > 1) + $rel = substr($rel, 0, strrpos($rel, "-")); + $priv_url = "http://ftp2.{$osname}.org/pub/{$osname}/ports/{$arch}/packages-{$rel}/All"; if (empty($base_url)) $base_url = $priv_url; if (substr($base_url, -1) == "/") @@ -1297,5 +1298,4 @@ function stop_packages() { } } -?> - \ No newline at end of file +?> \ No newline at end of file -- cgit v1.1