]> code.ossystems Code Review - openembedded-core.git/commitdiff
oe-git-proxy: Allow explicit IP addresses in $NO_PROXY
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>
Fri, 18 Sep 2015 10:46:04 +0000 (12:46 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 21 Sep 2015 14:20:09 +0000 (15:20 +0100)
Without this fix, if one specified, e.g., 127.0.0.1 in $NO_PROXY, the
oe-git-proxy script would fail with a message like this:

/home/pkj/yocto/poky/scripts/oe-git-proxy: line 64: 32-127.0.0.1: syntax error: invalid arithmetic operator (error token is ".0.0.1")

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
scripts/oe-git-proxy

index 48734556a148188094acf139d3f51167e6e4eeba..24732829fb71795598f1272a0a3af6bf197bb872 100755 (executable)
@@ -53,6 +53,7 @@ match_ipv4() {
 
        # Determine the mask bitlength
        BITS=${CIDR##*/}
+       [ "$BITS" != "$CIDR" ] || BITS=32
        if [ -z "$BITS" ]; then
                return 1
        fi