Fix squid configuration if no hdd cache should be used.
authorArne Fitzenreiter <arne_f@ipfire.org>
Sun, 26 Dec 2010 23:28:26 +0000 (00:28 +0100)
committerArne Fitzenreiter <arne_f@ipfire.org>
Sun, 26 Dec 2010 23:28:26 +0000 (00:28 +0100)
config/rootfiles/core/44/update.sh
html/cgi-bin/proxy.cgi

index 40a0895..47773fb 100644 (file)
@@ -176,6 +176,7 @@ chown nobody:nobody /var/ipfire/vpn/ipsec.conf
 mv /var/ipfire/proxy/squid.conf /var/ipfire/proxy/squid.conf.org
 grep -v "header_access " /var/ipfire/proxy/squid.conf.org | \
 grep -v "error_directory " | \
+grep -v "cache_dir null" | \
 grep -v "reply_body_max_size 0" > /var/ipfire/proxy/squid.conf
 echo >> /var/ipfire/proxy/squid.conf
 echo error_directory /etc/squid/errors >> /var/ipfire/proxy/squid.conf
index a387d3e..e120fc4 100644 (file)
@@ -3075,10 +3075,8 @@ cache_mem $proxysettings{'CACHE_MEM'} MB
 END
        ;
 
-       if ($proxysettings{'CACHE_SIZE'} eq '0')
+       if ($proxysettings{'CACHE_SIZE'} ne '0')
        {
-               print FILE "cache_dir null /var/tmp\n\n";
-       } else {
                print FILE "cache_dir aufs /var/log/cache $proxysettings{'CACHE_SIZE'} $proxysettings{'L1_DIRS'} 256\n\n";
        }