gh-133: Fixed generate network config for systemd-networkd. (#133)

* fix condition for add SEARCH_DOMAIN
* fixed condition gen_iface for IPv4 and IPv6
pull/137/head
Alexey Shabalin 6 years ago committed by Vlastimil Holer
parent 4da1b90ae4
commit 65cbdc43f6

@ -154,7 +154,7 @@ EOT
done done
fi fi
if [ -n "$DNS" ]; then if [ -n "$SEARCH_DOMAIN" ]; then
for domain in $SEARCH_DOMAIN; do for domain in $SEARCH_DOMAIN; do
echo "Domains=$domain" echo "Domains=$domain"
done done
@ -180,7 +180,7 @@ EOT
done done
fi fi
if [ -n "$DNS" ]; then if [ -n "$SEARCH_DOMAIN" ]; then
for domain in $SEARCH_DOMAIN; do for domain in $SEARCH_DOMAIN; do
echo "Domains=$domain" echo "Domains=$domain"
done done
@ -258,10 +258,13 @@ EOT
fi fi
[[ -n $IP || -n $CONTEXT_FORCE_IPV4 ]] && gen_iface_conf if [ -n "$IP" ] || [ -n "$CONTEXT_FORCE_IPV4" ]; then
[[ -n $IP6 ]] && gen_iface6_conf gen_iface_conf
fi
) > /etc/systemd/network/${DEV}.network if [ -n "$IP6" ]; then
gen_iface6_conf
fi
) > /etc/systemd/network/"${DEV}".network
done done
} }

Loading…
Cancel
Save