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

Bug#275360: [Patch] example patch showing where to hook dhcp network config to get dhcp->static config



This patch is in a VERY EARLY state. It inserts into
/etc/dhclient-script so that the ip/mask/route etc form dhcp can be
captured. This then needs to be put into the debconf database. this
will allow  development of static net config from a dhcp boot.


I did have some code that looked like this but this seemed not to
insert the valuses into debconf db...
       # copy DHCP information into debconf database (wishlist #275360)
       . /usr/share/debconf/confmodule
       db_set netcfg/get_ipaddress "$new_ip_address"
       db_set netcfg/get_netmask   "$new_mask"
       for router in $new_routers; do
               db_set netcfg/get_gateway "router"
               break
       done
       db_set netcfg/get_nameservers "$new_domain_name_servers"

The patch writes debconf-set statements to a file which could later be
sourced to set the values in debconf-db.

I don't have the knowledge or time to more now so wanted to put this
in BTS so others(or me later) can build on it!

Regards
Alex Owen



Reply to: