Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 156665
Collapse All | Expand All

(-)lomoco-1.0/udev/toudev.awk (-10 / +13 lines)
Lines 1-20 Link Here
1
#!/bin/awk -f
1
#!/bin/awk -f
2
BEGIN {
2
BEGIN {
3
	FS = ","
3
        FS = ","
4
	print "ACTION != \"add\", GOTO=\"lomoco_end\""
4
        print "# udev.rules file for Logitech mouse control using lomoco"
5
	print "SUBSYSTEM != \"usb\", GOTO=\"lomoco_end\""
5
        print "#"
6
	print "SYSFS{idVendor} != \"046d\", GOTO=\"lomoco_end\""
6
        print ""
7
	print ""
7
        print "ACTION != \"add\", GOTO=\"lomoco_end\""
8
        print "SUBSYSTEM != \"usb_device\", GOTO=\"lomoco_end\""
9
        print ""
8
}
10
}
9
11
10
$1 ~ /0xc[a-f0-9][a-f0-9][a-f0-9]/ {
12
$1 ~ /0xc[a-f0-9][a-f0-9][a-f0-9]/ {
11
    print "# " substr($3, index($3, "\"")) ", " $2
13
    print "# " substr($3, index($3, "\"")) ", " $2
12
    print "SYSFS{idProduct}==\"" substr($1, index($1, "x")+1) \
14
    print "SYSFS{idVendor}==\"046d\", SYSFS{idProduct}==\"" substr($1, 
13
	  "\", RUN=\"lomoco\""
15
index($1, "x")+1) \
16
          "\", RUN+=\"udev.lomoco\""
17
    print ""
14
}
18
}
15
19
16
END {
20
END {
17
	print ""
21
        print ""
18
	print "LABEL=\"lomoco_end\""
22
        print "LABEL=\"lomoco_end\""
19
}
23
}
20

Return to bug 156665