[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#703747: netcfg: preseed netcfg: confusion or regression about disable_dhcp, disable_autoconfig and use_autoconfig



Charles,

am Sun, Mar 24, 2013 at 06:48:49PM +0900 hast du folgendes geschrieben:
> isn't there a bug in netcfg.c ?
> 
>     /* 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");
> 
> To me, it seems that in plain English the above means: if autoconfig is not
> disabled then do not use autoconfig, which doees the contrary of what is
> intended.

| The strcmp() function compares the two strings s1 and s2.  It returns an inte‐
| ger less than, equal to, or greater than zero if s1 is found, respectively, to
| be less than, to match, or be greater than s2.

it's negated, hence it matches when disable_autoconfig=true. One could question
if the else case is really as intended, though.

Kind regards
Philipp Kern

Attachment: signature.asc
Description: Digital signature


Reply to: