summaryrefslogtreecommitdiff
path: root/extras
diff options
context:
space:
mode:
authorMartin Pitt <martin.pitt@ubuntu.com>2011-10-26 11:03:21 +0200
committerMartin Pitt <martin.pitt@ubuntu.com>2011-10-26 11:03:21 +0200
commit8ab7a9be03441db21d459cbb9c08400377c3556d (patch)
tree3ad388b032169b0838dd233a7d9da267c3c61477 /extras
parent3aa3be179fd7eea792e5dfe71e0b2c9723c8a9b2 (diff)
extras/keymap/findkeyboards: Filter out non-event devices
This avoids running udevadm info --query=name against a non-existing devnode, which aborts the script early.
Diffstat (limited to 'extras')
-rwxr-xr-xextras/keymap/findkeyboards5
1 files changed, 5 insertions, 0 deletions
diff --git a/extras/keymap/findkeyboards b/extras/keymap/findkeyboards
index 5a22649ec9..fd64301da6 100755
--- a/extras/keymap/findkeyboards
+++ b/extras/keymap/findkeyboards
@@ -21,6 +21,11 @@ keyboard_devices() {
for dev in `udevadm trigger --dry-run --verbose --property-match=ID_INPUT_KEYBOARD=1`; do
walk=`udevadm info --attribute-walk --path=$dev`
env=`udevadm info --query=env --path=$dev`
+ # filter out non-event devices, such as the parent input devices which
+ # have no devnode
+ if ! echo "$env" | grep -q '^DEVNAME='; then
+ continue
+ fi
if echo "$walk" | grep -q 'DRIVERS=="atkbd"'; then
echo -n 'AT keyboard: '
elif echo "$env" | grep -q '^ID_USB_DRIVER=usbhid'; then