Bug#315030: writes gateway ip to /etc/resolv.conf when using preseeded settings
That patch inspired me to create this (attached) patch.
Cheers
Geert Stappers
Index: debian/changelog
===================================================================
--- debian/changelog (revision 28588)
+++ debian/changelog (working copy)
@@ -4,6 +4,11 @@
* Switch to using libiw28.
* Add a hack to sed the substvars files to get proper dependency on
the libiw udeb w/o a versioned dependency on the deb.
+
+ [ Geert Stappers ]
+
+ * Respect preseeded nameserver, based on Christian Weeks patch,
+ closes: #315030
* Updated translations:
- Catalan (ca.po) by Guillem Jover
Index: netcfg-common.c
===================================================================
--- netcfg-common.c (revision 28588)
+++ netcfg-common.c (working copy)
@@ -890,8 +890,11 @@
char *ptr, ptr1[INET_ADDRSTRLEN];
int ret;
+ debconf_get(client,"netcfg/get_nameservers");
if (*nameservers)
ptr = *nameservers;
+ else if (strlen(client->value))
+ ptr = client->value
else if (gateway.s_addr)
{
inet_ntop (AF_INET, &gateway, ptr1, sizeof (ptr1));
Reply to: