summaryrefslogtreecommitdiffstats
path: root/lib/pb-config/pb-config.c
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2013-08-08 15:41:39 +0800
committerJeremy Kerr <jk@ozlabs.org>2013-08-08 16:30:00 +0800
commit9b7a01a40fd9476583fb5f7dfbd4006e45d8e291 (patch)
treeae9182a4f668ad5344a7d35a10dccad2803969f3 /lib/pb-config/pb-config.c
parent6557f07325409d769f414035cca05a563418e729 (diff)
downloadtalos-petitboot-9b7a01a40fd9476583fb5f7dfbd4006e45d8e291.tar.gz
talos-petitboot-9b7a01a40fd9476583fb5f7dfbd4006e45d8e291.zip
network: handle DNS config
If we have a dns config option, update resolv.conf Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'lib/pb-config/pb-config.c')
-rw-r--r--lib/pb-config/pb-config.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/pb-config/pb-config.c b/lib/pb-config/pb-config.c
index 5cd303b..315d990 100644
--- a/lib/pb-config/pb-config.c
+++ b/lib/pb-config/pb-config.c
@@ -26,7 +26,7 @@ static void dump_config(struct config *config)
pb_log(" autoboot: %s\n",
config->autoboot_enabled ? "enabled" : "disabled");
- if (config->n_network_configs > 0)
+ if (config->network.n_interfaces || config->network.n_dns_servers)
pb_log(" network configuration:\n");
for (i = 0; i < config->network.n_interfaces; i++) {
@@ -53,6 +53,8 @@ static void dump_config(struct config *config)
}
}
+ for (i = 0; i < config->network.n_dns_servers; i++)
+ pb_log(" dns server %s\n", config->network.dns_servers[i]);
}
int config_init(void *ctx)
OpenPOWER on IntegriCloud