diff options
author | jim-p <jimp@pfsense.org> | 2011-01-21 12:09:07 -0500 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2011-01-21 12:09:07 -0500 |
commit | 81e54daba5d5577b33ff482d3b609e45e8ee9525 (patch) | |
tree | 874f1c911dae8d5ada0858ca3c55f6e99844e11a /etc/inc/pkg-utils.inc | |
parent | e9bcc5fef63a5cbe8bd91785cb1cab90197346ea (diff) | |
download | pfsense-81e54daba5d5577b33ff482d3b609e45e8ee9525.zip pfsense-81e54daba5d5577b33ff482d3b609e45e8ee9525.tar.gz |
Use a better method to determine the FTP URL for FreeBSD based on the version being used. The old method worked with 8.1-RELEASE-p2 but failed with just 8.1-RELEASE.
Diffstat (limited to 'etc/inc/pkg-utils.inc')
-rw-r--r-- | etc/inc/pkg-utils.inc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc index 1560442..3a2984a 100644 --- a/etc/inc/pkg-utils.inc +++ b/etc/inc/pkg-utils.inc @@ -453,8 +453,9 @@ function pkg_fetch_recursive($pkgname, $filename, $dependlevel = 0, $base_url = $osname = php_uname("s"); $arch = php_uname("m"); - $rel = php_uname("r"); - $rel = strtolower(substr($rel, 0, strrpos($rel, "-"))); + $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; |