* Jérémy Bobbio <[EMAIL PROTECTED]> [2008-09-01 13:58]: > If this makes easier to support NAS devices, I think it should go in. > Might worth another line on the preseeding appendix as well. > > JFTR: "ptr" should probably be used as first argument of strcmp().
You're right. How about the patches below? Note that I'd really like to get this into lenny because preseeding of no gateway should be possible. (And I've patches ready for oldsys-preseed to use this feature.) OK to commit? For netcfg: Index: static.c =================================================================== --- static.c (revision 55526) +++ static.c (working copy) @@ -146,7 +146,8 @@ debconf_get(client, "netcfg/get_gateway"); ptr = client->value; - if (empty_str(ptr)) { /* No gateway, that's fine */ + if (empty_str(ptr) || /* No gateway, that's fine */ + (strcmp(ptr, "none") == 0)) /* special case for preseeding */ { /* clear existing gateway setting */ memset(&gateway, 0, sizeof(struct in_addr)); return 0; For the manual: Index: appendix/preseed.xml =================================================================== --- appendix/preseed.xml (revision 55630) +++ appendix/preseed.xml (working copy) @@ -837,6 +837,19 @@ #d-i hw-detect/load_firmware boolean true </screen></informalexample> +<para> + +Please note that <command>netcfg</command> will automatically determine the +netmask if <classname>netcfg/get_netmask</classname> is not preseeded. In +this case, the variable has to be marked as <literal>seen</literal> for +automatic installations. Similarly, <command>netcfg</command> will choose +an appropriate address (the <literal>.1</literal> address of your network) +if <classname>netcfg/get_gateway</classname> is not set. As a special +case, you can set <classname>netcfg/get_gateway</classname> to +<quote>none</quote> to specify that no gateway should be used. + +</para> + </sect2> <sect2 id="preseed-mirror"> -- Martin Michlmayr http://www.cyrius.com/ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]