busybox/find-touchscreen: handle input/device case
authorEric Bénard <eric@eukrea.com>
Fri, 29 Oct 2010 15:44:52 +0000 (17:44 +0200)
committerEric Bénard <eric@eukrea.com>
Sat, 30 Oct 2010 00:30:57 +0000 (02:30 +0200)
On a new configuration using 2.6.36 kernel + busybox 1.17.1 ,
find-toucscreen.sh fails because $MDEV is input/event0 and not event0.

This patch fixes this problem by removing input/ if present in $MDEV.

Signed-off-by: Eric Bénard <eric@eukrea.com>
recipes/busybox/files/find-touchscreen.sh

index 1582ea8..cfce788 100644 (file)
@@ -1,5 +1,7 @@
 #!/bin/sh
 
+MDEV=`echo $MDEV | sed 's#input/##g'`
+
 if [ `egrep "input:.*-e0.*,3,.*a0,1,.*18,.*" /sys/class/input/$MDEV/device/modalias|wc -l` -gt 0 ]; then
        ln -sf /dev/input/$MDEV /dev/input/touchscreen0
 fi