Hi, As recommended, I've updated my udhcpc command line from "udhcpc -h <hostname> ..." to "udhcpc -x hostname:<hostname> ...". However when running as a daemon/background, the new "-x hostname" option ceases to send the hostname in the DHCP discover broadcast. I've confirmed this by looking at the network traffic. In foreground mode (--foreground), "-x hostname" works as expected.
This issue may have come up previously: http://lists.busybox.net/pipermail/busybox/2012-July/078179.html but there was no resolution. I'm running busybox on a nommu platform, which compiles in some special case code in dhcpc.c Adding some debug prints before the call to bb_daemonize_or_rexec(), I get an argv of: "udhcpc", "--syslog", "--background", "-x", "hostname", "--interface", "eth0", NULL The "while (list_x) {" bit is modifying the hostname string with "*colon = ' ';" and the call to udhcp_str2optset(). The modified argv is then passed to bb_daemonize_or_rexec(). My question is: Is there a way to know if the udhcpc instance is the original invocation, or the re-exec'd invocation? If there is a way to know, my proposed solution would be to conditionally run the "while (list_x) {" bit only once running as the re-exec'd udhcpc. Happy to provide a patch. As an aside, on nommu, invoking udhcpc with "-b" fails with "udhcpc: invalid option -- b", whereas invoking with "--background" behaves as expected. Thanks, Ian _______________________________________________ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox