3 # This script converts the usb.usermap file for the Micro Solutions
4 # Backpack drives to an udev rules file
6 # Copyright 2006 by Rob Kennedy <archpackages@gmail.com>
7 # Licence for this script: GPL2
10 cat "$1" |
{ while read map
; do
12 if $
(echo "$map" |
grep -q ^
# > /dev/null); then
13 echo $map >> backpackusb.rules
17 if [ -n "$map" ]; then
21 vid
=$
(echo $3 | cut
-b3-)
22 pid
=$
(echo $4 | cut
-b3-)
24 echo -e "SYSFS{idVendor}==\"$vid\", SYSFS{idProduct}==\"$pid\", RUN+=\"/lib/udev/backpackusb.sh\"" >> backpackusb.rules