#!/system/bin/sh12# Setup networking when boot starts3ifconfig eth0 10.0.2.15 netmask 255.255.255.0 up4route add default gw 10.0.2.2 dev eth056# ro.kernel.android.qemud is normally set when we7# want the RIL (radio interface layer) to talk to8# the emulated modem through qemud.9#10# However, this will be undefined in two cases:11#12# - When we want the RIL to talk directly to a guest13# serial device that is connected to a host serial14# device by the emulator.15#16# - We don't want to use the RIL but the VM-based17# modem emulation that runs inside the guest system18# instead.19#20# The following detects the latter case and sets up the21# system for it.22#23qemud=`getprop ro.kernel.android.qemud`24case "$qemud" in25"")26radio_ril=`getprop ro.kernel.android.ril`27case "$radio_ril" in28"")29# no need for the radio interface daemon30# telephony is entirely emulated in Java31setprop ro.radio.noril yes32stop ril-daemon33;;34esac35;;36esac3738# Setup additionnal DNS servers if needed39num_dns=`getprop ro.kernel.ndns`40case "$num_dns" in412) setprop net.eth0.dns2 10.0.2.442;;433) setprop net.eth0.dns2 10.0.2.444setprop net.eth0.dns3 10.0.2.545;;464) setprop net.eth0.dns2 10.0.2.447setprop net.eth0.dns3 10.0.2.548setprop net.eth0.dns4 10.0.2.649;;50esac5152# disable boot animation for a faster boot sequence when needed53boot_anim=`getprop ro.kernel.android.bootanim`54case "$boot_anim" in550) setprop debug.sf.nobootanimation 156;;57esac5859# set up the second interface (for inter-emulator connections)60# if required61my_ip=`getprop net.shared_net_ip`62case "$my_ip" in63"")64;;65*) ifconfig eth1 "$my_ip" netmask 255.255.255.0 up66;;67esac686970