فهرست منبع

fix bonding and usb-direct

Alfonso Gamboa 3 سال پیش
والد
کامیت
3018a7a5d0
3فایلهای تغییر یافته به همراه16 افزوده شده و 0 حذف شده
  1. 3 0
      SD_ROOT/wz_mini/etc/network.d/S12remoteaccessory
  2. 3 0
      SD_ROOT/wz_mini/etc/rc.d/S07bonding
  3. 10 0
      SD_ROOT/wz_mini/usr/bin/netmon.sh

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

@@ -25,6 +25,9 @@ case "$1" in
 	start)
 	start)
 		remote &
 		remote &
 		;;
 		;;
+	stop)
+		pkill socat
+		;;
 	*)
 	*)
 		echo "Usage: $0 {start}"
 		echo "Usage: $0 {start}"
 		exit 1
 		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
 		mount -o bind /opt/wz_mini/bin/wpa_cli.sh /bin/wpa_cli
 	fi
 	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