Bug#703747: netcfg: preseed netcfg: confusion or regression about disable_dhcp, disable_autoconfig and use_autoconfig
Control: tags 703747 + pending
Control: found 703747 1.101
Control: tags 688273 + pending
Hello,
It seems the issue is merely that:
/* always always always default back to autoconfig, unless you've specified
* disable_autoconfig on the command line. */
debconf_get(client, "netcfg/disable_autoconfig");
if (!strcmp(client->value, "true"))
debconf_set(client, "netcfg/use_autoconfig", "false");
else
debconf_set(client, "netcfg/use_autoconfig", "true");
/* also support disable_dhcp for compatibility */
debconf_get(client, "netcfg/disable_dhcp");
if (!strcmp(client->value, "true"))
debconf_set(client, "netcfg/use_autoconfig", "false");
else
debconf_set(client, "netcfg/use_autoconfig", "true");
netcfg/disable_autoconfig has no effect of course, since
netcfg/disable_dhcp gets over it in all cases.
I have dropped the else part here, so disable_dhcp only has effect if
set to the non-default "true".
bilibop project, le Sat 23 Mar 2013 02:00:14 +0100, a écrit :
> d-i netcfg/disable_autoconfig boolean true
> -> doesn't work
> d-i netcfg/use_autoconfig boolean false
> -> doesn't work
> d-i netcfg/disable_autoconfig boolean true
> d-i netcfg/use_autoconfig boolean false
> -> doesn't work
> on boot cmdline: netcfg/disable_autoconfig=true netcfg/use_autoconfig=false
> -> doesn't work
Yes, all these get overriden by disable_dhcp.
> netcfg/disable_dhcp
> -> leads me directly to the configuration of a static IP
Yes, that one gets the last word, whatever is before. That should now
be fixed in the git tree, so disable_autoconfig will really be the right
way. Until that gets uploaded you can use the disable_dhcp compatibility
debconf.
> The version of netcfg shipped in the downloaded mini.iso is 1.106;
> there was a bugreport against the same program, version 1.92, to say that
> d-i netcfg/disable_dhcp boolean true
> fails [1]. Is 1.106 a regression ?
It's actually 1.101 which brought the regression.
> Now, to build a generic preseed.cfg file that could work with different
> versions of the
> installer, and to be sure DHCP config is skipped, I use:
> d-i netcfg/disable_dhcp boolean true
> d-i netcfg/disable_autoconfig boolean true
> d-i netcfg/use_autoconfig boolean false
>
> knowing that at least one of them (and probably two) is useless; but how to
> know
> which, in advance...
use_autoconfig shouldn't have to be set to false. Both disable_dhcp (for
squeeze and earlier) and disable_autoconfig (for wheezy and later)
should be enough alone.
I have uploaded a fixed version on:
http://dept-info.labri.fr/~thibault/tmp/mini.iso
Could you check that just netcfg/disable_autoconfig=true works for you
too?
Samuel
Reply to: