From 7330becdcb2761bde6807dd8296bb554d42fe1d6 Mon Sep 17 00:00:00 2001 From: Alexey Shabalin Date: Tue, 10 Apr 2018 02:06:35 +0300 Subject: [PATCH] - add DNS and Domain support in systemd network unit - IPV6 -> IP6 --- .../one-context.d/loc-10-network##arch.one | 73 +++++++++++++++---- 1 file changed, 57 insertions(+), 16 deletions(-) diff --git a/src/etc/one-context.d/loc-10-network##arch.one b/src/etc/one-context.d/loc-10-network##arch.one index 2c00b28..1f1e512 100755 --- a/src/etc/one-context.d/loc-10-network##arch.one +++ b/src/etc/one-context.d/loc-10-network##arch.one @@ -111,6 +111,18 @@ get_gateway6() { fi } +get_dns() { + dns=$(get_iface_var "DNS") + + echo $dns +} + +get_search_domain() { + search_domain=$(get_iface_var "SEARCH_DOMAIN") + + echo $search_domain +} + get_ip() { ip=$(get_iface_var "IP") @@ -124,7 +136,9 @@ get_iface_var() { echo $var } + gen_iface_conf() { + cat < /etc/systemd/network/${DEV}.network done } -[ -z "$(env | cut -d= -f1 | grep -E '^ETH[0-9]+_IPV*6*')" ] && exit 0 +[ -z "$(env | cut -d= -f1 | grep -E '^ETH[0-9]+_IP6*')" ] && exit 0 gen_network_configuration