aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2015-05-05 08:35:32 -0300
committerRenato Botelho <garga@FreeBSD.org>2015-05-05 17:19:08 -0300
commit5e162fc16051a55393ef1d5e45963c07e1438f50 (patch)
treea89d795f5f1d0b9a9cf31900ce6cebd248f3dda0
parent64407618c86bb70bed3791375853c41d1bcb134a (diff)
downloadpfsense-packages-5e162fc16051a55393ef1d5e45963c07e1438f50.tar.gz
pfsense-packages-5e162fc16051a55393ef1d5e45963c07e1438f50.tar.bz2
pfsense-packages-5e162fc16051a55393ef1d5e45963c07e1438f50.zip
Add support for 2.3+ pbi detection and remove duplicated definition of SQUID_BASE
-rwxr-xr-xconfig/squid3/34/squid.inc12
1 files changed, 9 insertions, 3 deletions
diff --git a/config/squid3/34/squid.inc b/config/squid3/34/squid.inc
index cce9bddd..4876b472 100755
--- a/config/squid3/34/squid.inc
+++ b/config/squid3/34/squid.inc
@@ -42,12 +42,18 @@ if(!function_exists("filter_configure"))
require_once("filter.inc");
$shortcut_section = "squid";
-define('SQUID_BASE', '/usr/pbi/squid-' . php_uname("m"));
-define('SQUID_LOCALBASE', SQUID_BASE . "/local");
+
+$pfs_version=substr(trim(file_get_contents("/etc/version")),0,3);
+if ($pfs_version == "2.1" || $pfs_version == "2.2") {
+ define('SQUID_BASE', '/usr/pbi/squid-' . php_uname("m"));
+ define('SQUID_LOCALBASE', SQUID_BASE . "/local");
+} else {
+ define('SQUID_BASE', '/usr/local');
+ define('SQUID_LOCALBASE', '/usr/local');
+}
define('SQUID_CONFBASE', SQUID_LOCALBASE .'/etc/squid');
define('SQUID_CONFFILE', SQUID_CONFBASE . '/squid.conf');
-define('SQUID_BASE', '/var/squid/');
define('SQUID_ACLDIR', '/var/squid/acl');
define('SQUID_PASSWD', '/var/etc/squid.passwd');
define('SQUID_LIB','/var/squid/lib');