scripts/functions
changeset 1290 108eaf22653b
parent 1272 ddac62e7c428
child 1292 546d2ed3410b
     1.1 --- a/scripts/functions	Fri Mar 27 23:40:07 2009 +0000
     1.2 +++ b/scripts/functions	Mon Apr 06 20:27:17 2009 +0000
     1.3 @@ -317,7 +317,7 @@
     1.4              # Find all interfaces and build locally accessible networks
     1.5              server_ip=$(ping -c 1 -W 2 "${CT_PROXY_HOST}" |head -n 1 |sed -r -e 's/^[^\(]+\(([^\)]+)\).*$/\1/;' || true)
     1.6              CT_TestOrAbort "SOCKS proxy '${CT_PROXY_HOST}' has no IP." -n "${server_ip}"
     1.7 -            /sbin/ifconfig |gawk -v server_ip="${server_ip}" '
     1.8 +            /sbin/ifconfig |"${awk}" -v server_ip="${server_ip}" '
     1.9                  BEGIN {
    1.10                      split( server_ip, tmp, "\\." );
    1.11                      server_ip_num = tmp[1] * 2^24 + tmp[2] * 2^16 + tmp[3] * 2^8 + tmp[4] * 2^0;
    1.12 @@ -845,7 +845,7 @@
    1.13      # We must omit shell functions, and some specific bash variables
    1.14      # that break when restoring the environment, later. We could do
    1.15      # all the processing in the gawk script, but a sed is easier...
    1.16 -    set |gawk '
    1.17 +    set |"${awk}" '
    1.18                BEGIN { _p = 1; }
    1.19                $0~/^[^ ]+ \(\)/ { _p = 0; }
    1.20                _p == 1