init.goldfish.sh revision 2a743730c7d1a8adba8a922f7af46cef0b35363a
1#!/system/bin/sh
2
3ifconfig eth0 10.0.2.15 netmask 255.255.255.0 up
4route add default gw 10.0.2.2 dev eth0
5
6qemud=`getprop ro.kernel.android.qemud`
7case "$qemud" in
8    "")
9    radio_ril=`getprop ro.kernel.android.ril`
10    case "$radio_ril" in
11        "")
12        # no need for the radio interface daemon
13        # telephony is entirely emulated in Java
14        setprop ro.radio.noril yes
15        stop ril-daemon
16        ;;
17    esac
18    ;;
19esac
20
21num_dns=`getprop ro.kernel.android.ndns`
22case "$num_dns" in
23    2) setprop net.eth0.dns2 10.0.2.4
24    ;;
25    3) setprop net.eth0.dns2 10.0.2.4
26    setprop net.eth0.dns3 10.0.2.5
27    ;;
28    4) setprop net.eth0.dns2 10.0.2.4
29    setprop net.eth0.dns3 10.0.2.5
30    setprop net.eth0.dns4 10.0.2.6
31    ;;
32esac
33
34# disable boot animation for a faster boot sequence when needed
35boot_anim=`getprop ro.kernel.android.bootanim`
36case "$boot_anim" in
37    0)  setprop debug.sf.nobootanimation 1
38    ;;
39esac
40
41# call 'qemu-props' to set system properties from the emulator.
42#
43/system/bin/qemu-props
44
45# this line doesn't really do anything useful. however without it the
46# previous setprop doesn't seem to apply for some really odd reason
47setprop ro.qemu.init.completed 1
48
49# set up the second interface (for inter-emulator connections)
50# if required
51my_ip=`getprop net.shared_net_ip`
52case "$my_ip" in
53    "")
54    ;;
55    *) ifconfig eth1 "$my_ip" netmask 255.255.255.0 up
56    ;;
57esac
58