ramips: Add support to TP-Link Archer MR200
[lede-git/.git] / target / linux / ramips / base-files / etc / init.d / enablemodem
diff --git a/target/linux/ramips/base-files/etc/init.d/enablemodem b/target/linux/ramips/base-files/etc/init.d/enablemodem
new file mode 100755 (executable)
index 0000000..a7e6c2e
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/sh /etc/rc.common
+. /lib/ramips.sh
+
+START=99
+
+start() {
+       local board=$(ramips_board_name)
+       if [ $board = "mr200" ]; then
+               adb wait-for-device
+               adb shell chmod +x /WEBSERVER/www/cgi-bin/*
+               adb shell httpd -h /WEBSERVER/www/ &
+               echo "2357 000d" > /sys/bus/usb-serial/drivers/option1/new_id
+               sleep 2
+               adb kill-server
+       fi
+}