Udev can help to get rid of the ugly $ sudo irattach irda0 -s in my previous blog post.
I added the following udev rule:
$ cat /etc/udev/rules.d/95-usb-irda.rules
# Connect the IRDA USB Dongle
# see http://de.gentoo-wiki.com/Udev_Rules
# use “$ lsusb -v” to get the details about the dongle
ACTION==”add”, BUS==”usb”, SYSFS{manufacturer}==” Sigmatel Inc “, SYSFS{product}==” IrDA/USB Bridge”, NAME=”%k”, RUN+=”/usr/local/bin/usb-irda-add.sh”
# …