I'm working on a little sh script that runs in initramfs, and I need to know whether there is a keyboard attached or not.
I thought I could use the existence of /dev/input/by-id if a keyboard is attached, but this doesn't seem to be populated in initramfs, so this test always fails, even with a keyboard attached.I didn't see anything obvious in the initramfs /dev, and searching was moderately futile.
PS yes, this is pi-related![Laughing :lol:]()
I thought I could use the existence of /dev/input/by-id if a keyboard is attached, but this doesn't seem to be populated in initramfs, so this test always fails, even with a keyboard attached.
Code:
if [ -e /dev/input/by-id ]; then echo "there is a keyboard"fi
PS yes, this is pi-related

Statistics: Posted by bls — Fri May 03, 2024 12:01 am