#!/bin/sh # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing. HUB_RESET="/sys/devices/soc/30800000.aips-bus/30a50000.i2c/i2c-3/3-0008/USB3503_RESET/value" reset_hub() { echo 0 > $HUB_RESET sleep 0.1 echo 1 > $HUB_RESET } HUB_ID="0424:3503" lsusb -d $HUB_ID > /dev/null 2>&1 if [ $? -ne 0 ]; then reset_hub fi ./ToaRun.sh exit 0