From a448b35f551d423355c0344c99df7ec7786769f2 Mon Sep 17 00:00:00 2001 From: jim-p Date: Thu, 21 Jun 2012 13:15:06 -0400 Subject: Restore this code that was accidentally reverted --- etc/inc/pkg-utils.inc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'etc/inc/pkg-utils.inc') diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc index 4e90b56..bb3e483 100644 --- a/etc/inc/pkg-utils.inc +++ b/etc/inc/pkg-utils.inc @@ -518,12 +518,11 @@ function pkg_fetch_recursive($pkgname, $filename, $dependlevel = 0, $base_url = $fetchdir = $g['tmp_path']; } - $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"; + /* 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/"; if (empty($base_url)) $base_url = $priv_url; if (substr($base_url, -1) == "/") -- cgit v1.1