Răsfoiți Sursa

fix bonding and usb-direct

Alfonso Gamboa 3 ani în urmă
părinte
comite
3018a7a5d0

+ 3 - 0
SD_ROOT/wz_mini/etc/network.d/S12remoteaccessory

@@ -25,6 +25,9 @@ case "$1" in
 	start)
 		remote &
 		;;
+	stop)
+		pkill socat
+		;;
 	*)
 		echo "Usage: $0 {start}"
 		exit 1

+ 3 - 0
SD_ROOT/wz_mini/etc/rc.d/S07bonding

@@ -78,6 +78,9 @@ bonding_setup() {
 		mount -o bind /opt/wz_mini/bin/wpa_cli.sh /bin/wpa_cli
 	fi
 
+	echo "Run network monitor for USB Direct"
+        /opt/wz_mini/usr/bin/netmon.sh &
+
 }
 
 

+ 10 - 0
SD_ROOT/wz_mini/usr/bin/netmon.sh

@@ -0,0 +1,10 @@
+#!/bin/sh
+
+. /opt/wz_mini/wz_mini.conf
+. /opt/wz_mini/etc/rc.common
+
+
+if [[ "$ENABLE_USB_DIRECT" == "true" ]]; then
+        wait_for_wlan_ip $(basename "$0")
+        gateway_supervisor $(basename "$0")
+fi