projects
/
librfid
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
587eec9
)
extract device from dmesg
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sun, 19 Jan 2014 14:20:08 +0000
(15:20 +0100)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sun, 19 Jan 2014 14:20:08 +0000
(15:20 +0100)
reset-reader.sh
patch
|
blob
|
history
diff --git
a/reset-reader.sh
b/reset-reader.sh
index
ed16ccd
..
2f09071
100755
(executable)
--- a/
reset-reader.sh
+++ b/
reset-reader.sh
@@
-1,8
+1,11
@@
#!/bin/sh -xe
-dev=`lsusb | grep 076b:5.21 | awk '{ print $2 "-" $4 }' | sed -e 's/0//g' -e 's/://'`
+#dev=`lsusb | grep 076b:5.21 | awk '{ print $2 "-" $4 }' | sed -e 's/0//g' -e 's/://'`
+dev=`dmesg | grep OMNIKEY | cut -d" " -f3 | cut -d: -f1 | tail -1`
authorized=/sys/bus/usb/devices/$dev/authorized
+test -w $authorized || exit 1
echo 0 > $authorized
-dmesg
+dmesg | tail -2
+sleep 1
echo 1 > $authorized
-dmesg
+dmesg
| tail -2