Date: Mon, 16 Oct 2000 12:01:07 -0700 (PDT) From: Nick Hibma <n_hibma@qubesoft.com> To: Chris Dillon <cdillon@wolves.k12.mo.us> Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/etc usbd.conf Message-ID: <Pine.BSF.4.20.0010161200410.13415-100000@henny.webweaving.org> In-Reply-To: <Pine.BSF.4.20.0010161155400.13374-100000@henny.webweaving.org>
next in thread | previous in thread | raw e-mail | index | archive | help
This won't work as ${DEVNAME} is invalid on detach, so you won't be able to get at the interface. :-( The proper solution would be the make dhclient aware of interfaces that disappear. Once the interface has disappeared it should terminate. This would make things work for pccard as well. Nick > That reminds me... attached is a patch for usbd.conf that will do > away with the nasty "killall dhclient" on detach of a USB ethernet > interface. I don't have a way to actually test this patch, but it > is simple enough that I don't think I screwed anything up. I just > know someone is going to get bit by this in the future if it isn't > fixed. :-) > > We might want to be real careful anywhere else we use "killall", as > well. > > I'll paste it here, in addition to the attachment, for good measure: > > --- usbd.conf Mon Oct 16 13:09:00 2000 > +++ usbd.conf.old Mon Oct 16 13:11:19 2000 > @@ -28,8 +28,8 @@ > # > device "USB ethernet" > devname "[ack]ue[0-9]+" > - attach "dhclient ${DEVNAME}" > - detach "killall dhclient" > + attach "dhclient -pf /var/run/dhclient.${DEVNAME}.pid ${DEVNAME}" > + detach "kill `cat /var/run/dhclient.${DEVNAME}.pid`" > > # The entry below starts moused when a mouse is plugged in. Moused > # stops automatically (actually it bombs :) when the device disappears. > > > > -- Chris Dillon - cdillon@wolves.k12.mo.us - cdillon@inter-linc.net > FreeBSD: The fastest and most stable server OS on the planet. > For IA32 and Alpha architectures. IA64 and PowerPC under development. > http://www.freebsd.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.20.0010161200410.13415-100000>