@@ -62,6 +62,7 @@ variables_reset() {
62
62
ip_broadcast=
63
63
ip_gateway=
64
64
ip_nameservers=
65
+ ip_ipv6=
65
66
drivers_to_load=
66
67
online_config=
67
68
gpu_mem=
@@ -137,6 +138,7 @@ variables_set_defaults() {
137
138
variable_set " ip_netmask" " 0.0.0.0"
138
139
variable_set " ip_broadcast" " 0.0.0.0"
139
140
variable_set " ip_gateway" " 0.0.0.0"
141
+ variable_set " ip_ipv6" " 1"
140
142
variable_set " hdmi_tv_res" " 1080p"
141
143
variable_set " hdmi_monitor_res" " 1024x768"
142
144
variable_set " hdmi_disable_overscan" " 0"
@@ -1202,6 +1204,7 @@ echo " keyboard_layout = ${keyboard_layout}"
1202
1204
echo " locales = ${locales} "
1203
1205
echo " system_default_locale = ${system_default_locale} "
1204
1206
echo " wlan_country = ${wlan_country} "
1207
+ echo " ip_ipv6 = ${ip_ipv6} "
1205
1208
echo " cmdline = ${cmdline} "
1206
1209
echo " drivers_to_load = ${drivers_to_load} "
1207
1210
echo " gpu_mem = ${gpu_mem} "
@@ -1614,6 +1617,12 @@ echo "OK"
1614
1617
1615
1618
# networking
1616
1619
echo -n " Configuring network settings... "
1620
+
1621
+ if [ " ${ip_ipv6} " = " 0" ]; then
1622
+ mkdir -p /rootfs/etc/sysctl.d
1623
+ echo " net.ipv6.conf.all.disable_ipv6 = 1" > /rootfs/etc/sysctl.d/01-disable-ipv6.conf
1624
+ fi
1625
+
1617
1626
touch /rootfs/etc/network/interfaces || fail
1618
1627
# lo interface may already be there, so first check for it
1619
1628
if ! grep -q " auto lo" /rootfs/etc/network/interfaces; then
0 commit comments