blob: 1983a272b74fd8daeed9a3c9466798153ffb6881 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#!/bin/sh
[ "$1" = "usbutils" ] || exit 0
# Binary accessible via alternatives
test -x /usr/libexec/lsusb-usbutils
# lsusb tree view runs without crashing (may be empty in test env)
lsusb -t 2>/dev/null; [ $? -ne 127 ]
# lsusb device listing runs without crashing
lsusb 2>/dev/null; [ $? -ne 127 ]
# usbreset is installed and shows usage when invoked without arguments
usbreset 2>&1 | grep -q "Usage:"
|