gh-26: skip conf for interfaces without IP

pull/49/head
Javi Fontan 9 years ago
parent 3af4c9919f
commit e037c33b4a

@ -114,10 +114,6 @@ get_gateway6() {
get_ip() {
ip=$(get_iface_var "IP")
if [ -z "$ip" ]; then
ip=$(mac2ip $MAC)
fi
echo $ip
}
@ -212,6 +208,8 @@ gen_network_configuration()
GATEWAY6=$(get_gateway6)
CONTEXT_FORCE_IPV4=$(get_iface_var "CONTEXT_FORCE_IPV4")
[ -z "${IP}${IPV6}" ] && continue
(
cat <<EOT
[Match]

@ -93,10 +93,6 @@ get_gateway6() {
get_ip() {
ip=$(get_iface_var "IP")
if [ -z "$ip" ]; then
ip=$(mac2ip $MAC)
fi
echo $ip
}
@ -226,6 +222,8 @@ EOT
GATEWAY6=$(get_gateway6)
CONTEXT_FORCE_IPV4=$(get_iface_var "CONTEXT_FORCE_IPV4")
[ -z "${IP}${IPV6}" ] && continue
echo "auto $DEV"
[[ -z $IPV6 || -n $CONTEXT_FORCE_IPV4 ]] && gen_iface_conf

@ -93,10 +93,6 @@ get_gateway6() {
get_ip() {
ip=$(get_iface_var "IP")
if [ -z "$ip" ]; then
ip=$(mac2ip $MAC)
fi
echo $ip
}
@ -181,6 +177,8 @@ gen_network_configuration()
GATEWAY6=$(get_gateway6)
CONTEXT_FORCE_IPV4=$(get_iface_var "CONTEXT_FORCE_IPV4")
[ -z "${IP}${IPV6}" ] && continue
(
cat <<EOT
DEVICE=$DEV

Loading…
Cancel
Save