#!/bin/sh source /opt/wz_mini/wz_mini.conf #Set module dir depending on platform if [ -f /opt/wz_mini/tmp/.T20 ]; then KMOD_PATH="/opt/wz_mini/lib/modules/3.10.14" else KMOD_PATH="/opt/wz_mini/lib/modules/3.10.14__isvp_swan_1.0__" fi if [[ "$ENABLE_USB_ETH" == "true" ]]; then ALT_IFACE=eth0 elif [[ "$ENABLE_USB_DIRECT" == "true" ]] || [[ "$ENABLE_USB_RNDIS" == "true" ]]; then ALT_IFACE=usb0 fi #Set the correct GPIO for the audio driver (T31 only) if [ -f /opt/wz_mini/tmp/.HL_PAN2 ]; then GPIO=7 elif [ -f /opt/wz_mini/tmp/.WYZE_CAKP2JFUS ]; then GPIO=63 fi wait_for_wlan() { while true; do if ifconfig wlan0 | grep "HWaddr"; then break fi echo "Network HW not ready yet, try again in 5 seconds" sleep 5 done } wait_for_wlan_wpa() { while true; do if [ -e /tmp/wpa_supplicant.conf ]; then break fi echo "wpa_supplicant not initialized yet, try again in 5 seconds" sleep 5 done } wait_for_wlan_ip() { while true; do if ifconfig wlan0 | grep "inet addr"; then break fi echo "IP Address not aquired yet, try again in 5 seconds" sleep 5 done } wait_for_icamera() { while ! pgrep -f "/system/bin/iCamera" > /dev/null; do sleep 5 done }