Bug#497285: not possible to preseed that no gatway should be used?
Package: netcfg
It seems it's not possible to tell netcfg via preseeding that no
gateway should be used. I thought this was possible but I cannot
figure out how and the code suggests that it's not possible.
joeyh made the following change in 2005 to allow preseeding:
Index: static.c
===================================================================
--- static.c (revision 28680)
+++ static.c (revision 28681)
@@ -132,7 +132,9 @@
ptr[1] = '\0';
}
- debconf_set(client, "netcfg/get_gateway", ptr1);
+ debconf_get(client, "netcfg/get_gateway");
+ if (empty_str(client->value))
+ debconf_set(client, "netcfg/get_gateway", ptr1);
return 0;
}
This sets netcfg/get_gateway to the calculated gateway if
netcfg/get_gateway is empty. So when you preseed an empty value, the
calculated gateway will be used.
Wouldn't it make sense to check if the seen flag is set?
--
Martin Michlmayr
http://www.cyrius.com/
Reply to: