On Wed, Oct 6, 2010 at 9:50 PM, Jim Sheldon <[email protected]> wrote: > Greetings! > > I have a device running busybox 1.13.2. When ifup kicks off udhcpc, I > would like it to have these arguments:
My personal view has not changed: ifup is a badly designed tool in general: http://busybox.net/~vda/no_ifup.txt but anyway... > udhcpc -R -n -p /var/run/udhcpc.eth0.pid -i eth0 -H <hostname> > > However, so far I can't get '-H <hostname>' to come through. > > Looking through networking/ifupdown.c I see: > > { "udhcpc", > "udhcpc -R -n -p /var/run/udhcpc.%iface%.pid -i > %iface%[[ -H %hostname%]][[ -c %clientid%]]" > "[[ -s %script%]][[ %udhcpc_opts%]]", > "kill `cat /var/run/udhcpc.%iface%.pid` 2>/dev/null", > }, > > So clearly [[ -H %hostname%]] is not working for some reason. > > I'm assuming this must be an environment variable, or read from the > system somehow? I tried adding 'hostname=myhost' in > /usr/share/udhcpc/default.script and /etc/udhcpc.d/50default, neither > worked. > > I have a proper hostname set in /etc/hostname, does busybox expect it > to be somewhere else? http://www.digipedia.pl/man/doc/view/interfaces.5/ The dhcp Method This method may be used to obtain an address via DHCP with any of the tools: dhclient, pump, udhcpc, dhcpcd. (They have been listed in their order of precedence.) If you have a complicated DHCP setup you should note that some of these clients use their own configuration files and do not obtain their configuration information via ifup. Options hostname hostname <====================== HERE Hostname to be requested (pump, dhcpcd, udhcpc) leasehours leasehours Preferred lease time in hours (pump) leasetime leasetime Preferred lease time in seconds (dhcpcd) -- vda _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
