From 8fde8b635f6ff53f282b3dde0f0c0ba4522a7a1b Mon Sep 17 00:00:00 2001 From: Derek Jennings Date: Wed, 10 Jul 2013 07:29:11 +0000 Subject: only use transparent proxy with squid <3.2 (mga#10513) --- bin/drakguard | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/drakguard b/bin/drakguard index 42f8e90..5b34430 100755 --- a/bin/drakguard +++ b/bin/drakguard @@ -579,7 +579,9 @@ sub unblock_internet_dansguardian { sub enable_transparent_proxy { my ($port) = @_; #- FIXME: use network::squid once it is rewritten to be more gentle with the config file - subst_config_line($network::squid::squid_conf_file, "http_port $port transparent\n"); + # Only use transparent proxy if squid version < 3.2. Handle upgrades nicely + substr(`rpm -q squid`, 6, 3) < 3.2 ? subst_config_line($network::squid::squid_conf_file, "http_port $port transparent\n") : + subst_config_line($network::squid::squid_conf_file, "http_port $port\n"); } #- mostly duplicated for MDK::Common::System::getVarsFromSh -- cgit v1.2.1