• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/system/bin/sh
2
3# Setup networking when boot starts
4ifconfig eth0 10.0.2.15 netmask 255.255.255.0 up
5route add default gw 10.0.2.2 dev eth0
6
7
8# Setup additionnal DNS servers if needed
9num_dns=`getprop ro.kernel.ndns`
10case "$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       ;;
20esac
21
22
23# set up the second interface (for inter-emulator connections)
24# if required
25my_ip=`getprop net.shared_net_ip`
26case "$my_ip" in
27    "")
28    ;;
29    *) ifconfig eth1 "$my_ip" netmask 255.255.255.0 up
30    ;;
31esac
32
33