OSDN Git Service

init.sh: use lsusb from our busybox
authorChih-Wei Huang <cwhuang@linux.org.tw>
Wed, 2 Nov 2016 07:18:31 +0000 (15:18 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Wed, 2 Nov 2016 07:18:31 +0000 (15:18 +0800)
We've implemented -v option in busybox lsusb to list usb classes.
Avoid using lsusb of toybox which doesn't have the function.

init.sh

diff --git a/init.sh b/init.sh
index c6f9760..a9e2bb4 100644 (file)
--- a/init.sh
+++ b/init.sh
@@ -66,7 +66,7 @@ function init_hal_bluetooth()
                        modprobe btusb
                        ;;
                *)
                        modprobe btusb
                        ;;
                *)
-                       for bt in $(lsusb -v | awk ' /Class:.E0/ { print $9 } '); do
+                       for bt in $(busybox lsusb -v | awk ' /Class:.E0/ { print $9 } '); do
                                chown 1002.1002 $bt && chmod 660 $bt
                        done
                        ;;
                                chown 1002.1002 $bt && chmod 660 $bt
                        done
                        ;;