1#!/vendor/bin/sh 2 3# Check if VirtIO Wi-Fi is enabled. If so, create a mac80211_hwsim radio 4# and run the DHCP client 5wifi_virtio=`getprop ro.boot.qemu.virtiowifi` 6case "$wifi_virtio" in 7 1) wifi_mac_prefix=`getprop vendor.net.wifi_mac_prefix` 8 if [ -n "$wifi_mac_prefix" ]; then 9 /vendor/bin/mac80211_create_radios 1 $wifi_mac_prefix || exit 1 10 fi 11 setprop ctl.start dhcpclient_wifi 12 ;; 13esac 14 15# set up the second interface (for inter-emulator connections) 16# if required 17my_ip=`getprop vendor.net.shared_net_ip` 18case "$my_ip" in 19 "") 20 ;; 21 *) ifconfig eth1 "$my_ip" netmask 255.255.255.0 up 22 ;; 23esac 24 25