#!/bin/sh

#commit


exit 0
bt_available=`lsusb | grep 0bda`
if [ ! -z "$bt_available" ]; then
    echo "[IM][system init][Load bluetooth related kernel modules...][+]"
    insmod /usr/lib/modules/bluetooth.ko
    insmod /usr/lib/modules/rfcomm.ko
    insmod /usr/lib/modules/bnep.ko
    insmod /usr/lib/modules/hidp.ko
    insmod /usr/lib/modules/rtk_8xxxxxu.ko

    export DBUS_SYSTEM_BUS_ADDRESS="unix:path=/var/run/dbus/system_bus_socket"
    mkdir -p /var/run/dbus || true
    rm -rf /var/run/dbus/pid || true

    echo "[IM][system init][Start DBus...][+]"
    dbus-daemon --config-file=/etc/dbus-1/system.conf
    /etc/init.d/bluez_cycle &
fi
