Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Jan 2005 20:12:08 +0100
From:      Bram Van Steenlandt <brampie@no-wackos.com>
To:        ticso@cicely.de
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: device id question (usb and scsi)
Message-ID:  <41F00288.5070409@no-wackos.com>
In-Reply-To: <20050120155610.GC5661@cicely12.cicely.de>
References:  <41EF810B.7060301@no-wackos.com> <20050120140941.GA5661@cicely12.cicely.de> <41EFD22D.1000209@no-wackos.com> <20050120155610.GC5661@cicely12.cicely.de>

next in thread | previous in thread | raw e-mail | index | archive | help
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.
>
>  
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?41F00288.5070409>