diff options
Diffstat (limited to 'etc/inc/pkg-utils.inc')
-rw-r--r-- | etc/inc/pkg-utils.inc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc index e9fcf01..cf06694 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) == "/") @@ -1299,3 +1298,4 @@ function stop_packages() { } ?> +
\ No newline at end of file |