From owner-freebsd-current@FreeBSD.ORG Thu Dec 11 18:14:40 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DB81216A4CE for ; Thu, 11 Dec 2003 18:14:40 -0800 (PST) Received: from pit.databus.com (p70-227.acedsl.com [66.114.70.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8DC2A43D1F for ; Thu, 11 Dec 2003 18:14:39 -0800 (PST) (envelope-from barney@pit.databus.com) Received: from pit.databus.com (localhost [127.0.0.1]) by pit.databus.com (8.12.10/8.12.10) with ESMTP id hBC2EciR019323; Thu, 11 Dec 2003 21:14:38 -0500 (EST) (envelope-from barney@pit.databus.com) Received: (from barney@localhost) by pit.databus.com (8.12.10/8.12.10/Submit) id hBC2Ec1A019322; Thu, 11 Dec 2003 21:14:38 -0500 (EST) (envelope-from barney) Date: Thu, 11 Dec 2003 21:14:38 -0500 From: Barney Wolff To: Andrew Thompson Message-ID: <20031212021438.GA18921@pit.databus.com> References: <20031212014907.GA86634@kate.fud.org.nz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031212014907.GA86634@kate.fud.org.nz> User-Agent: Mutt/1.4.1i X-Scanned-By: MIMEDefang 2.38 cc: current@freebsd.org Subject: Re: devd & ukbd X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2003 02:14:41 -0000 On Fri, Dec 12, 2003 at 02:49:07PM +1300, Andrew Thompson wrote: > > I am trying to put together a devd rule for attaching a usb keyboard. The > problem is that the usb device is called ukbd0 while the keyboard needs to > be referred to as kbd1. > > attach 10 { > device-name "ukbd[0-9]+"; > action "kbdcontrol -k /dev/$device-name < /dev/console"; > }; > detach 10 { > device-name "ukbd[0-9]+"; > action "kbdcontrol -k /dev/kbd0"; > }; > > This obviously doesnt work as /dev/ukbd0 doesnt exist, anyone know a way > in devd to translate it to /dev/kbd1? > > maybe something like kbd($device-number + 1) > > A better solution would be if the kbd1 device caused a devd event when > attached, which it does not seem to. I do it in /etc/usbd.conf, with: device "KB" devname "ukbd[0-9]+" attach "kbdcontrol -k `ls /dev/kbd* |tail -1`