summaryrefslogtreecommitdiff
path: root/recipes-core/usb-rndis/files/start-rndis.sh
blob: 18eecfb737dfd022c19b2841dc3bd9c166e7bb21 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh
# configures the usb gadget to provide rnidis, 
case "$1" in
	start)
		/sbin/modprobe g_ether dev_addr=00:14:2d:ff:ff:ff host_addr=00:14:2d:ff:ff:fe \
		  sleep 1 && /sbin/ifconfig usb0 192.168.11.2 \
		  && /usr/sbin/udhcpd -S /etc/udhcpd-usb-rndis.conf
	;;
	
	stop)
		/sbin/modprobe -r g_ether
	;;
esac

exit 0