diff options
author | jim-p <jimp@pfsense.org> | 2012-06-19 09:45:16 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2012-06-19 09:45:16 -0400 |
commit | f2d5c538a578cb59c7705fea85f4315bef975da6 (patch) | |
tree | 6f150fc7424dc0eafb4cf0d4c87a965f9fae2b23 /etc/inc/pkg-utils.inc | |
parent | cc43c4f8b0cbeb867c005b126e684d720c06fb11 (diff) | |
download | pfsense-f2d5c538a578cb59c7705fea85f4315bef975da6.zip pfsense-f2d5c538a578cb59c7705fea85f4315bef975da6.tar.gz |
Fix trailing whitespace
Diffstat (limited to 'etc/inc/pkg-utils.inc')
-rw-r--r-- | etc/inc/pkg-utils.inc | 14 |
1 files changed, 7 insertions, 7 deletions
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 +?> |