On Debian always use IPv4 if available, disable IPv6 autoconfiguration

This feature is already present in EL scripts:
b513d94c96
c2316a74de
pull/66/head
Vlastimil Holer 8 years ago
parent d1168e5cc4
commit a7a44f0596
No known key found for this signature in database
GPG Key ID: EB549BADEFD07C53

@ -155,6 +155,8 @@ gen_iface6_conf() {
iface $DEV inet6 static
address $IPV6
netmask 64
autoconf 0
accept_ra 0
EOT
if [ -n "$MTU" ]; then
@ -213,14 +215,13 @@ EOT
IPV6=$(get_iface_var "IPV6")
[[ -z $IPV6 ]] && IPV6=$(get_iface_var "IP6")
GATEWAY6=$(get_gateway6)
CONTEXT_FORCE_IPV4=$(get_iface_var "CONTEXT_FORCE_IPV4")
[ -z "${IP}${IPV6}" ] && continue
[ -z "${DEV}" ] && continue
echo "auto $DEV"
[[ -z $IPV6 || -n $CONTEXT_FORCE_IPV4 ]] && gen_iface_conf
[[ -n $IP ]] && gen_iface_conf
[[ -n $IPV6 ]] && gen_iface6_conf
done

@ -169,7 +169,6 @@ gen_network_configuration()
IPV6=$(get_iface_var "IPV6")
[[ -z $IPV6 ]] && IPV6=$(get_iface_var "IP6")
GATEWAY6=$(get_gateway6)
CONTEXT_FORCE_IPV4=$(get_iface_var "CONTEXT_FORCE_IPV4")
[ -z "${IP}${IPV6}" ] && continue
[ -z "${DEV}" ] && continue

Loading…
Cancel
Save