summaryrefslogtreecommitdiffstats
path: root/etc/inc/pkg-utils.inc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2012-06-18 11:43:36 -0400
committerjim-p <jimp@pfsense.org>2012-06-18 11:43:36 -0400
commitce35c6068c15be9244479400911815d29cd85a56 (patch)
treebba391256a2cbea337915fd5f52e6aebbcd38623 /etc/inc/pkg-utils.inc
parentbfb005344d122b6cc304f0e6866b6990e5e812b6 (diff)
downloadpfsense-ce35c6068c15be9244479400911815d29cd85a56.zip
pfsense-ce35c6068c15be9244479400911815d29cd85a56.tar.gz
Don't fall back to fetching PBIs from FreeBSD, they have none.
Diffstat (limited to 'etc/inc/pkg-utils.inc')
-rw-r--r--etc/inc/pkg-utils.inc12
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
OpenPOWER on IntegriCloud