diff options
author | Jun Aruga <junaruga@users.noreply.github.com> | 2020-01-07 04:23:04 +0100 |
---|---|---|
committer | NARUSE, Yui <nurse@users.noreply.github.com> | 2020-01-07 12:23:04 +0900 |
commit | f132825ffa1c225b0055ce6b0aa0d8428fba2623 (patch) | |
tree | 083742d1ebea121a1f24d08b5d53e3990465e533 /tool | |
parent | b0bf654c3164e9c6b5b38aa6fe23bd76d28a38d2 (diff) |
Disable IPv6 on Travis s390x case. (#2819)
This fixes following error that sometimes happens once in a few times
on Travis s390x environment.
```
$ tool/travis_retry.sh sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
+ sudo -E apt-add-repository -y ppa:ubuntu-toolchain-r/test
Error: retrieving gpg key timed out.
```
Diffstat (limited to 'tool')
-rwxr-xr-x | tool/travis_disable_ipv6.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tool/travis_disable_ipv6.sh b/tool/travis_disable_ipv6.sh new file mode 100755 index 0000000000..97ba179d6e --- /dev/null +++ b/tool/travis_disable_ipv6.sh @@ -0,0 +1,11 @@ +#!/bin/bash +set -ex +ip a +sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1 +sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1 +sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=1 +ip a + +cat /etc/hosts +sudo ruby -e "hosts = File.read('/etc/hosts').sub(/^::1\s*localhost.*$/, ''); File.write('/etc/hosts', hosts)" +cat /etc/hosts |