diff options
author | jim-p <jimp@pfsense.org> | 2012-06-21 13:15:06 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2012-06-21 13:15:06 -0400 |
commit | a448b35f551d423355c0344c99df7ec7786769f2 (patch) | |
tree | b6c9578b98ef1e25235cb1e6892d3ab9fbc71aa4 | |
parent | 0d5eff9f84580b74bfaa1e50576565c155f5e2c8 (diff) | |
download | pfsense-a448b35f551d423355c0344c99df7ec7786769f2.zip pfsense-a448b35f551d423355c0344c99df7ec7786769f2.tar.gz |
Restore this code that was accidentally reverted
-rw-r--r-- | etc/inc/pkg-utils.inc | 11 |
1 files changed, 5 insertions, 6 deletions
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) == "/") |