device id question (usb and scsi)

Bram Van Steenlandt brampie at no-wackos.com
Thu Jan 20 11:11:25 PST 2005


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.
>
>  
>



More information about the freebsd-hackers mailing list