ok so it's working but really ugly code atm :
I added a udev rule :
KERNEL=="usb[0-9]*", DEVPATH=="/devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2:1.0/net/usb0", ACTION=="add", RUN+="/usr/local/sbin/kindle-usb-add.sh %k"
I was not able to get the udev being trigger trough a ATTRS{vendor}=="Kindle " so I had to:
udevadm monitor --kernel (and the connect the kindle)
to find where the kindle was mounted. (hence the DEVPATH=="/devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2:1.0/net/usb0" )
Then the kindle-usb-add.sh has only the ifconfig usb0 192.168.2.1 in a bash script
so it's working but the udev is plain ugly and would love to find something more classy so that udev can
'see' the kindle and not only look for the devpath. Even if I plug it in a different usb the udev don't work...
|