aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2011-04-27 10:43:51 -0400
committerjim-p <jimp@pfsense.org>2011-04-27 10:43:51 -0400
commit38439ef8cfaa2a778c02981c6c2e72c55a27ba7f (patch)
treed9dfea754724094591762361dcbfda0384ec2ffd
parent780af2e7678dcccf0fd730a06549facd00906707 (diff)
downloadpfsense-packages-38439ef8cfaa2a778c02981c6c2e72c55a27ba7f.tar.gz
pfsense-packages-38439ef8cfaa2a778c02981c6c2e72c55a27ba7f.tar.bz2
pfsense-packages-38439ef8cfaa2a778c02981c6c2e72c55a27ba7f.zip
Stop squid from doing a recursive chown/chgrp inside the cache folder, should speed up save/sync with a large cache. Version bump to reflect change.
-rw-r--r--config/squid/squid.inc8
-rwxr-xr-xpkg_config.7.xml2
-rwxr-xr-xpkg_config.8.xml2
-rwxr-xr-xpkg_config.8.xml.amd642
4 files changed, 9 insertions, 5 deletions
diff --git a/config/squid/squid.inc b/config/squid/squid.inc
index 792a121f..61498294 100644
--- a/config/squid/squid.inc
+++ b/config/squid/squid.inc
@@ -63,7 +63,8 @@ function squid_chown_recursive($dir, $user, $group) {
while (($item = readdir($handle)) !== false) {
if (($item != ".") && ($item != "..")) {
$path = "$dir/$item";
- if (is_dir($path))
+ // Recurse unless it's the cache dir, that is slow and rarely necessary.
+ if (is_dir($path) && (basename($dir) != "cache"))
squid_chown_recursive($path, $user, $group);
elseif (is_file($path)) {
chown($path, $user);
@@ -98,8 +99,11 @@ function squid_dash_z() {
mwexec("/usr/local/sbin/squid -z");
}
- if(file_exists("/var/squid/cache/swap.state"))
+ if(file_exists("/var/squid/cache/swap.state")) {
+ chown("/var/squid/cache/swap.state", "proxy");
+ chgrp("/var/squid/cache/swap.state", "proxy");
exec("chmod a+rw /var/squid/cache/swap.state");
+ }
}
diff --git a/pkg_config.7.xml b/pkg_config.7.xml
index a3bfb9e5..cf71452e 100755
--- a/pkg_config.7.xml
+++ b/pkg_config.7.xml
@@ -758,7 +758,7 @@
<descr>High performance web proxy cache.</descr>
<website>http://www.squid-cache.org/</website>
<category>Network</category>
- <version>2.7.9_4</version>
+ <version>2.7.9_4.1</version>
<status>Stable</status>
<required_version>1.2.1</required_version>
<maintainer>fernando@netfilter.com.br seth.mos@xs4all.nl mfuchs77@googlemail.com</maintainer>
diff --git a/pkg_config.8.xml b/pkg_config.8.xml
index 2b8b1f4e..639040d2 100755
--- a/pkg_config.8.xml
+++ b/pkg_config.8.xml
@@ -729,7 +729,7 @@
<descr>High performance web proxy cache.</descr>
<website>http://www.squid-cache.org/</website>
<category>Network</category>
- <version>2.7.9_4</version>
+ <version>2.7.9_4.1</version>
<status>Stable</status>
<required_version>2</required_version>
<maintainer>fernando@netfilter.com.br seth.mos@xs4all.nl mfuchs77@googlemail.com jimp@pfsense.org</maintainer>
diff --git a/pkg_config.8.xml.amd64 b/pkg_config.8.xml.amd64
index b01fc01d..cce30c53 100755
--- a/pkg_config.8.xml.amd64
+++ b/pkg_config.8.xml.amd64
@@ -36,7 +36,7 @@
<descr>High performance web proxy cache.</descr>
<website>http://www.squid-cache.org/</website>
<category>Network</category>
- <version>2.7.9_4</version>
+ <version>2.7.9_4.1</version>
<status>Stable</status>
<required_version>2</required_version>
<maintainer>fernando@netfilter.com.br seth.mos@xs4all.nl mfuchs77@googlemail.com jimp@pfsense.org</maintainer>