diff options
| author | Bdale Garbee <bdale@gag.com> | 2017-04-24 18:22:03 -0600 |
|---|---|---|
| committer | Bdale Garbee <bdale@gag.com> | 2017-04-24 18:22:03 -0600 |
| commit | b91f67005709cb7f65e0a461b49b5cb0952cb391 (patch) | |
| tree | e9f6c0f30a81cf30a9cfd52887171168f7830f85 /ao-bringup/test-chaoskey | |
| parent | 1e956f93e0c9f8ed6180490f80e8aead5538f818 (diff) | |
| parent | 8a10ddb0bca7d6f6aa4aedda171899abd165fd74 (diff) | |
Merge branch 'branch-1.7' into debian
Diffstat (limited to 'ao-bringup/test-chaoskey')
| -rwxr-xr-x | ao-bringup/test-chaoskey | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ao-bringup/test-chaoskey b/ao-bringup/test-chaoskey index b4c8164f..f64b1f84 100755 --- a/ao-bringup/test-chaoskey +++ b/ao-bringup/test-chaoskey @@ -12,7 +12,9 @@ case "$#" in serial="--serial $1" ;; 0) - snum=`dmesg | grep 'on chaoskey' | tail -1 | sed 's/.*chaoskey \([0-9a-f][0-9a-f]*\) on chaoskey.*/\1/'` + snum=`sudo dmesg | awk '/usb.*Product:/ { ck = index($0, "ChaosKey"); } + /usb.*SerialNumber:/ { if (ck) print $5; }' | tail -1` + case "$snum" in "") serial="" |
