1.1 --- a/scripts/crosstool.sh Tue Jun 24 16:19:45 2008 +0000
1.2 +++ b/scripts/crosstool.sh Wed Jul 16 21:57:12 2008 +0000
1.3 @@ -235,13 +235,12 @@
1.4 CT_DoLog DEBUG "http_proxy='${http_proxy}'"
1.5 ;;
1.6 sockssys)
1.7 - CT_HasOrAbort tsocks
1.8 # Force not using HTTP proxy
1.9 unset http_proxy ftp_proxy https_proxy
1.10 + CT_HasOrAbort tsocks
1.11 . tsocks -on
1.12 ;;
1.13 socks*)
1.14 - CT_HasOrAbort tsocks
1.15 # Force not using HTTP proxy
1.16 unset http_proxy ftp_proxy https_proxy
1.17 # Remove any lingering config file from any previous run
1.18 @@ -249,7 +248,7 @@
1.19 # Find all interfaces and build locally accessible networks
1.20 server_ip=$(ping -c 1 -W 2 "${CT_PROXY_HOST}" |head -n 1 |sed -r -e 's/^[^\(]+\(([^\)]+)\).*$/\1/;' || true)
1.21 CT_TestOrAbort "SOCKS proxy '${CT_PROXY_HOST}' has no IP." -n "${server_ip}"
1.22 - /sbin/ifconfig |gawk -v server_ip="${server_ip}" '
1.23 + /sbin/ifconfig |awk -v server_ip="${server_ip}" '
1.24 BEGIN {
1.25 split( server_ip, tmp, "\\." );
1.26 server_ip_num = tmp[1] * 2^24 + tmp[2] * 2^16 + tmp[3] * 2^8 + tmp[4] * 2^0;
1.27 @@ -308,7 +307,9 @@
1.28 ;;
1.29 esac
1.30 echo "server_type = ${proxy_type}" >> "${CT_BUILD_DIR}/tsocks.conf"
1.31 - validateconf -f "${CT_BUILD_DIR}/tsocks.conf" 2>&1 |CT_DoLog DEBUG
1.32 + CT_HasOrAbort tsocks
1.33 + # If tsocks was found, then validateconf is present (distributed with tsocks).
1.34 + CT_DoExecLog DEBUG validateconf -f "${CT_BUILD_DIR}/tsocks.conf"
1.35 export TSOCKS_CONF_FILE="${CT_BUILD_DIR}/tsocks.conf"
1.36 . tsocks -on
1.37 ;;