From 8ab7a9be03441db21d459cbb9c08400377c3556d Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 26 Oct 2011 11:03:21 +0200 Subject: 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. --- extras/keymap/findkeyboards | 5 +++++ 1 file changed, 5 insertions(+) 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 -- cgit v1.2.3-54-g00ecf