1 #!/system/bin/sh 2 3 # Setup networking when boot starts 4 ifconfig eth0 10.0.2.15 netmask 255.255.255.0 up 5 route add default gw 10.0.2.2 dev eth0 6 7 8 # Setup additionnal DNS servers if needed 9 num_dns=`getprop ro.kernel.ndns` 10 case "$num_dns" in 11 2) setprop net.eth0.dns2 10.0.2.4 12 ;; 13 3) setprop net.eth0.dns2 10.0.2.4 14 setprop net.eth0.dns3 10.0.2.5 15 ;; 16 4) setprop net.eth0.dns2 10.0.2.4 17 setprop net.eth0.dns3 10.0.2.5 18 setprop net.eth0.dns4 10.0.2.6 19 ;; 20 esac 21 22 23 # set up the second interface (for inter-emulator connections) 24 # if required 25 my_ip=`getprop net.shared_net_ip` 26 case "$my_ip" in 27 "") 28 ;; 29 *) ifconfig eth1 "$my_ip" netmask 255.255.255.0 up 30 ;; 31 esac 32 33