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

proposals for netcfg-static



Hi d-i-team,

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).

I have take a closer look in the netcfg-static.c file, but I have
currently now idea how we can retrieve the current stored value from
cdebconf. If we can get these values, it should be easy to reoffer the
old values (the user can now simply hit enter).
If one off the value is empty the calculate function can catch this
event.


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;
}


Thanks for your help,
bye
Thorsten


-- 
Thorsten Sauter
<tsauter@gmx.net>

				(Is there life after /sbin/halt -p?)

Attachment: pgp3lMv1AunhX.pgp
Description: PGP signature


Reply to: