[debian-edu-commits] debian-edu/ 01/05: Rewrite wpad-extract tool to be independent from KDE related files. (Closes: #888829).

Mike Gabriel sunweaver at debian.org
Wed Feb 28 10:12:14 UTC 2018


This is an automated email from the git hooks/post-receive script.

sunweaver pushed a commit to branch stretch
in repository debian-edu-config.

commit b0e0efbd4c646a4c0e9344a552836cb5a72010da
Author: Wolfgang Schweer <wschweer at arcor.de>
Date:   Sat Jan 6 23:45:02 2018 +0100

    Rewrite wpad-extract tool to be independent from KDE related files. (Closes: #888829).
---
 share/debian-edu-config/tools/wpad-extract | 23 +++++------------------
 1 file changed, 5 insertions(+), 18 deletions(-)

diff --git a/share/debian-edu-config/tools/wpad-extract b/share/debian-edu-config/tools/wpad-extract
index 07890e1..edfec72 100755
--- a/share/debian-edu-config/tools/wpad-extract
+++ b/share/debian-edu-config/tools/wpad-extract
@@ -1,28 +1,15 @@
 #!/bin/bash
-
 #
 # Detect proxy URL via WPAD
 #
-# Author: Mike Gabriel
+# Author: Wolfgang Schweer
 # License: GNU General Public License v2 or later
 
-# This new and very short wpad-extract script is a replacement
-# for the old (before squeeze) libjavascript-perl based wpad-extract
-# script. This version uses libproxy-tools to retrieve the
-# proxy URL and thus is much shorter then its predecessor.
-
-# Trick the KDE4 config backend to use the settings there to load the
-# WPAD setting.  See also bug #644373.
+# This version uses pactester from package libpacparser1.
 
 # Look up one of the www.debian.org IP addresses to avoid hanging on
 # DNS if the skolelinux machines are not connected to the Internet.
-proxy_url=$(KDE_FULL_SESSION=foo \
-   KDEDIRS=/usr/share/debian-edu/networked-kde3 \
-   proxy http://130.89.148.14 2>/dev/null | cut -d" " -f1)
+proxy_url=$(curl -s http://wpad/wpad.dat | pactester -p - \
+            -u http://130.89.148.14 | awk '{print $2}' | cut -d';' -f1)
+echo http_proxy=http://$proxy_url
 
-# make sure direct:// urls do not make it through to the system config
-case "$proxy_url" in
-    http:*|https:*)
-	echo http_proxy=$proxy_url
-	;;
-esac

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/debian-edu-config.git



More information about the debian-edu-commits mailing list