blob: a47ac157943c0a19c1c8ebba18b22a65f25c277c [file] [log] [blame]
bohub1733552017-05-26 10:27:34 -07001#!/vendor/bin/sh
bohu06600752016-12-27 11:03:41 -08002
Bjoern Johanssonbf93db32017-07-14 15:47:19 -07003# Check if WiFi is enabled. If it is run the WiFi init script. If not we just
4# have to run the DHCP client in the default namespace and that will set up
5# all the networking.
Bjoern Johansson00455fa2017-02-09 22:37:51 -08006wifi=`getprop ro.kernel.qemu.wifi`
7case "$wifi" in
Bjoern Johanssond154a212017-08-31 13:48:45 -07008 1) /vendor/bin/init.wifi.sh
Bjoern Johansson00455fa2017-02-09 22:37:51 -08009 ;;
Bjoern Johanssonbf93db32017-07-14 15:47:19 -070010 *) setprop ctl.start dhcpclient_def
bohu06600752016-12-27 11:03:41 -080011 ;;
12esac
13
bohu06600752016-12-27 11:03:41 -080014# set up the second interface (for inter-emulator connections)
15# if required
16my_ip=`getprop net.shared_net_ip`
17case "$my_ip" in
18 "")
19 ;;
20 *) ifconfig eth1 "$my_ip" netmask 255.255.255.0 up
21 ;;
22esac
23