Skip to content

Commit

Permalink
scripts/wireguard: Limit connection time to 30 seconds
Browse files Browse the repository at this point in the history
If infra fails, this will make sure we don't block people's builds.

Suggested-by: Francisco Franco <franciscofranco.1990@gmail.com>
Signed-off-by: khusika <khusikadhamar@gmail.com>
  • Loading branch information
zx2c4 authored and khusika committed Jan 13, 2019
1 parent ad54842 commit d1707ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/fetch-latest-wireguard.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ while read -r distro package version _; do
VERSION="$version"
break
fi
done < <(curl -A "$USER_AGENT" -LSs https://build.wireguard.com/distros.txt)
done < <(curl -A "$USER_AGENT" -LSs --connect-timeout 30 https://build.wireguard.com/distros.txt)

[[ -n $VERSION ]]

Expand All @@ -23,6 +23,6 @@ fi

rm -rf net/wireguard
mkdir -p net/wireguard
curl -A "$USER_AGENT" -LsS "https://git.zx2c4.com/WireGuard/snapshot/WireGuard-$VERSION.tar.xz" | tar -C "net/wireguard" -xJf - --strip-components=2 "WireGuard-$VERSION/src"
curl -A "$USER_AGENT" -LsS --connect-timeout 30 "https://git.zx2c4.com/WireGuard/snapshot/WireGuard-$VERSION.tar.xz" | tar -C "net/wireguard" -xJf - --strip-components=2 "WireGuard-$VERSION/src"
sed -i 's/tristate/bool/;s/default m/default y/;' net/wireguard/Kconfig
touch net/wireguard/.check

0 comments on commit d1707ee

Please sign in to comment.