From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 20 19:11:25 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 723D816A4CE for ; Thu, 20 Jan 2005 19:11:25 +0000 (GMT) Received: from europa.telenet-ops.be (europa.telenet-ops.be [195.130.132.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1EF1B43D3F for ; Thu, 20 Jan 2005 19:11:25 +0000 (GMT) (envelope-from brampie@no-wackos.com) Received: from localhost (localhost.localdomain [127.0.0.1]) by europa.telenet-ops.be (Postfix) with SMTP id A225A198270; Thu, 20 Jan 2005 20:11:23 +0100 (MET) Received: from [192.168.1.100] (d54C33E68.access.telenet.be [84.195.62.104]) by europa.telenet-ops.be (Postfix) with ESMTP id 4DF80198073; Thu, 20 Jan 2005 20:11:23 +0100 (MET) Message-ID: <41F00288.5070409@no-wackos.com> Date: Thu, 20 Jan 2005 20:12:08 +0100 From: Bram Van Steenlandt User-Agent: Mozilla Thunderbird 0.7.3 (X11/20041209) X-Accept-Language: en-us, en MIME-Version: 1.0 To: ticso@cicely.de References: <41EF810B.7060301@no-wackos.com> <20050120140941.GA5661@cicely12.cicely.de> <41EFD22D.1000209@no-wackos.com> <20050120155610.GC5661@cicely12.cicely.de> In-Reply-To: <20050120155610.GC5661@cicely12.cicely.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Fri, 21 Jan 2005 12:42:28 +0000 cc: freebsd-hackers@freebsd.org Subject: Re: device id question (usb and scsi) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jan 2005 19:11:25 -0000 Hi, Thanks a lot ,it works bram Bernd Walter wrote: >On Thu, Jan 20, 2005 at 04:45:49PM +0100, Bram Van Steenlandt wrote: > > >>Hi >> >>Thanks a lot for the response I've done some reading and googling and >>this does seems to be the best way. >> >>I am however also rather new to FreeBSD and I don't really where to >>start for something like this. >> >>I have checked out usbd.conf and devd.conf but in neither files there is >>a part in wich it says create ulpt0 if this device is a printer so maybe >>this is not the file I want to change. >> >> > >ulpt0 is a device node, you want a softlink to the devicenode. >E.g. you could create a /etc/devd/ulpt.conf with the following content: >attach 1 { > device-name "ulpt[0-9]+"; > action "/etc/devd/ulpt-start.sh $device-name $sernum"; >}; > >And /dev/dev/ulpt-start.sh: >#! /bin/sh >cd /dev >case "$2" in >${serialnumber_of_your_printer}) > rm -f /dev/my_printer > ln -s /dev/$1 /dev/my_printer > ;;; >esac > >For printing you would use /dev/my_printer. >The serialnumber can be queried with devinfo -v. >If your printer has no serial number you have to use other criteria to >indetify your device, such as the port it is connected to. >If you start devd with debugging you see what variables are available >to devd - other points have to be queried in your start scripts. > > >