From owner-cvs-all Tue Oct 17 8:46:54 2000 Delivered-To: cvs-all@freebsd.org Received: from calcaphon.demon.co.uk (calcaphon.demon.co.uk [193.237.19.5]) by hub.freebsd.org (Postfix) with ESMTP id A73B537B4F9; Tue, 17 Oct 2000 08:46:47 -0700 (PDT) Received: from localhost (gate [192.168.1.1]) by calcaphon.demon.co.uk (8.9.3/8.9.1) with ESMTP id QAA28237; Tue, 17 Oct 2000 16:46:40 +0100 (BST) (envelope-from n_hibma@qubesoft.com) Date: Tue, 17 Oct 2000 08:46:24 -0700 (PDT) From: Nick Hibma X-Sender: n_hibma@henny.webweaving.org Reply-To: Nick Hibma To: Chris Dillon Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/etc usbd.conf In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 > > -- Qube Software, Ltd. Private: n_hibma@qubesoft.com n_hibma@webweaving.org n_hibma@freebsd.org http://www.qubesoft.com/ http://www.etla.net/~n_hibma/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message