The dhclient binary in the net-misc/dhcp package fails to recognize the -nw option, printing out usage information instead of accepting the option. This is actually an upstream bug in the original ISC code which is fixed in the 3.0.1rc9 upstream version. However, until 3.0.1 is included in Gentoo, it would be nice to patch the bug in the 3.0pl1 version currently included in Gentoo. The following patch can be applied to fix the problem: -----quote------- diff -rc ./dhcp-3.0pl1/client/dhclient.c dhcp-3.0pl1-fixed/client/dhclient.c *** ./dhcp-3.0pl1/client/dhclient.c Wed Aug 8 08:46:14 2001 --- dhcp-3.0pl1-fixed/client/dhclient.c Wed Sep 18 13:32:32 2002 *************** *** 198,205 **** } else if (!strcmp (argv [i], "-w")) { /* do not exit if there are no broadcast interfaces. */ persist = 1; - } else if (argv [i][0] == '-') { - usage (); } else if (!strcmp (argv [i], "-e")) { struct string_list *tmp; if (++i == argc) --- 198,203 ---- *************** *** 216,221 **** --- 214,221 ---- exit (0); } else if (!strcmp (argv [i], "-nw")) { nowait = 1; + } else if (argv[i][0] == '-') { + usage (); } else { struct interface_info *tmp = (struct interface_info *)0; status = interface_allocate (&tmp, MDL); ------end quote------ A simple addition of the patch application to the ebuild completes the fix: -----quote-------- src_unpack() { unpack ${A} cd ${S} patch -p1 < ${FILESDIR}/dhcp-3.0pl1-r4-gentoo.patch || die cd ${S}/includes cat <<- END >> site.h -----end quote--------
Guys, get somebody who uses dhcp ....
next time post your patches and such as attachements ;) bugzilla doesnt handle displaying patches properly (too many spaces, not enough tabs, etc...)
comitted to cvs ... check out -r4 to see if it fixes your problem if it works for you, close this bug ;)