proxy/installer/configure-proxy.sh | 9 +++++++--
proxy/installer/squid.conf | 2 +-
2 files changed, 8 insertions(+), 3 deletions(-)
New commits:
commit 584367df7cda39203e1018e5d6446002bc228ae8
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Mar 25 14:12:58 2010 +0100
squid 3.X has acl 'all' built-in
diff --git a/proxy/installer/configure-proxy.sh b/proxy/installer/configure-proxy.sh
index 339865a..627ff42 100755
--- a/proxy/installer/configure-proxy.sh
+++ b/proxy/installer/configure-proxy.sh
@@ -357,8 +357,13 @@ SQUID_SIZE=$(df -P /var/spool/squid | awk '{a=$4} END
{printf("%d", a * 60 / 100
ln -sf /etc/pki/spacewalk/jabberd/server.pem /etc/jabberd/server.pem
/usr/bin/spacewalk-setup-jabberd --macros "hostname:$HOSTNAME"
-sed "s|cache_dir ufs /var/spool/squid 15000 16 256|cache_dir ufs /var/spool/squid
$SQUID_SIZE 16 256|g" \
- < $DIR/squid.conf > $SQUID_DIR/squid.conf
+SQUID_REWRITE="s|cache_dir ufs /var/spool/squid 15000 16 256|cache_dir ufs
/var/spool/squid $SQUID_SIZE 16 256|g;"
+SQUID_VER_MAJOR=$(squid -v | awk -F'[ .]' '/Version/ {print $4}')
+if [ $SQUID_VER_MAJOR -ge 3 ] ; then
+ # squid 3.X has acl 'all' built-in
+ SQUID_REWRITE="$SQUID_REWRITE s/^acl all.*//;"
+fi
+sed "$SQUID_REWRITE" < $DIR/squid.conf > $SQUID_DIR/squid.conf
sed -e "s|\${session.ca_chain:/usr/share/rhn/RHNS-CA-CERT}|$CA_CHAIN|g" \
-e "s/\${session.http_proxy}/$HTTP_PROXY/g" \
-e "s/\${session.http_proxy_username}/$HTTP_USERNAME/g" \
commit 5a31ec862463841e6a8596d58a6e6d58796751d9
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Mar 25 14:00:57 2010 +0100
made localhost acl definition work in squid-3.X too
diff --git a/proxy/installer/squid.conf b/proxy/installer/squid.conf
index 7072ea4..f564ade 100644
--- a/proxy/installer/squid.conf
+++ b/proxy/installer/squid.conf
@@ -25,7 +25,7 @@ refresh_pattern \.rpm$ 10080 100% 525960 override-expire
override-lastmod igno
refresh_pattern . 0 100% 525960
acl all src 0.0.0.0/0.0.0.0
-acl localhost src 127.0.0.1/255.255.255.255
+acl localhost src 127.0.0.1/32
acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 443 # https
Show replies by date