bohu | b173355 | 2017-05-26 10:27:34 -0700 | [diff] [blame] | 1 | #!/vendor/bin/sh |
bohu | 0660075 | 2016-12-27 11:03:41 -0800 | [diff] [blame] | 2 | |
Bjoern Johansson | bf93db3 | 2017-07-14 15:47:19 -0700 | [diff] [blame] | 3 | # 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 Johansson | 00455fa | 2017-02-09 22:37:51 -0800 | [diff] [blame] | 6 | wifi=`getprop ro.kernel.qemu.wifi` |
| 7 | case "$wifi" in |
Bjoern Johansson | d154a21 | 2017-08-31 13:48:45 -0700 | [diff] [blame] | 8 | 1) /vendor/bin/init.wifi.sh |
Bjoern Johansson | 00455fa | 2017-02-09 22:37:51 -0800 | [diff] [blame] | 9 | ;; |
Bjoern Johansson | bf93db3 | 2017-07-14 15:47:19 -0700 | [diff] [blame] | 10 | *) setprop ctl.start dhcpclient_def |
bohu | 0660075 | 2016-12-27 11:03:41 -0800 | [diff] [blame] | 11 | ;; |
| 12 | esac |
| 13 | |
bohu | 0660075 | 2016-12-27 11:03:41 -0800 | [diff] [blame] | 14 | # set up the second interface (for inter-emulator connections) |
| 15 | # if required |
| 16 | my_ip=`getprop net.shared_net_ip` |
| 17 | case "$my_ip" in |
| 18 | "") |
| 19 | ;; |
| 20 | *) ifconfig eth1 "$my_ip" netmask 255.255.255.0 up |
| 21 | ;; |
| 22 | esac |
| 23 | |