This avoids running udevadm info --query=name against a non-existing devnode,
which aborts the script early.
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