1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/tool/disable_ipv6.sh
fedor dd78084ea6 .cirrus.yml: Add Cirrus CI for Arm64 tests.
Co-authored-by: fedor <fedor@cirruslabs.org>
2021-09-22 09:01:43 +02:00

9 lines
289 B
Bash
Executable file

#!/bin/bash
set -ex
sysctl -w net.ipv6.conf.all.disable_ipv6=1
sysctl -w net.ipv6.conf.default.disable_ipv6=1
sysctl -w net.ipv6.conf.lo.disable_ipv6=1
cat /etc/hosts
ruby -e "hosts = File.read('/etc/hosts').sub(/^::1\s*localhost.*$/, ''); File.write('/etc/hosts', hosts)"
cat /etc/hosts