projects
/
librfid
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
extract device from dmesg
[librfid]
/
reset-reader.sh
1
#!/bin/sh -xe
2
3
#dev=`lsusb | grep 076b:5.21 | awk '{ print $2 "-" $4 }' | sed -e 's/0//g' -e 's/://'`
4
dev=`dmesg | grep OMNIKEY | cut -d" " -f3 | cut -d: -f1 | tail -1`
5
authorized=/sys/bus/usb/devices/$dev/authorized
6
test -w $authorized || exit 1
7
echo 0 > $authorized
8
dmesg | tail -2
9
sleep 1
10
echo 1 > $authorized
11
dmesg | tail -2