On Friday 17 August 2007 01:08, kylix wrote: > Hi,all > > I want to build a DHCP server on my embedded linux system. > My busybox version is v1.3. > when udhcpd running, it will get the configure infomation from > "udhcpd.conf", and then send the offer to client > with IP, Gateway, DNS, Mask. > But My machine has two ethernet interface, It be > configure as gateway. the first one run udhcpc, and > the second run udhcpd. > udhcpd send the offer message include DNS address, > this address in static, I want to get the DNS option > from "/etc/reslov.conf" , because this file is configued > dynamic by udhcpc. > How will I do ?
Write a script which reads DNS address off /etc/resolv.conf and inserts it into udhcpd configuration file. Then (re)start udhcpd. Or just add updating of udhcpd.conf to you udhcpc script, along with updatind of /etc/resolv.conf which you already have there. > I had try to modify the "busybox/networking/udhcp/serverpacket.c", > but no success. I add two function in it, and add a call in > the line 174: addDnsOption( packet.options ); Hacking on C code for that is a wrong approach. -- vda _______________________________________________ busybox mailing list busybox@busybox.net http://busybox.net/cgi-bin/mailman/listinfo/busybox