Re: proposals for netcfg-static
* Thorsten Sauter
| after playing with the new installer, I have found some mysterious in
| the netcfg-static binary.
|
| If you configure the network the first time the netcfg-static propose
| and calculate some default values for the network (ip-adress, subnet,
| gateway, ...). However this shouldn't happend, if netcfg is started a
| second or third time.
| On the second time the netcfg binary recalculate the values (netmask,
| gateway) and override the old entered settings. I think this should not
| happend. :)
|
| Creating the default route makes also problems, because the netcfg
| simply add the new gateway without removing the old (maybe same) default
| gateway. Maybe we can read the the current gateway from /proc (not sure
| if mounted on any stage).
Netcfg is supposed to be rewritten once we get a more up-to-date
busybox in the archive (with the «ip» command compiled in).
| So my final question...
| How can get values from cdebconf?
|
| Unfortunately the following snipset doesn't work. The gateway variable
| should now contains the value
|
| client->command(client, "get", "netcfg/get_gateway", NULL, &gateway, NULL);
| if(gateway == 0) {
| /* empty value calculate the gateway */
| gateway = ipaddress & netmask;
| }
client->command(client, "get", "netcfg/get_gateway", NULL, &gateway,
NULL);
is supposed to be
client->command(client, "get", "netcfg/get_gateway", NULL);
and you need to access client->value to get the value.
--
Tollef Fog Heen ,''`.
UNIX is user friendly, it's just picky about who its friends are : :' :
`. `'
`-
Reply to: