summaryrefslogtreecommitdiffstats
path: root/init.ranchu-net.sh
blob: a47ac157943c0a19c1c8ebba18b22a65f25c277c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/vendor/bin/sh

# Check if WiFi is enabled. If it is run the WiFi init script. If not we just
# have to run the DHCP client in the default namespace and that will set up
# all the networking.
wifi=`getprop ro.kernel.qemu.wifi`
case "$wifi" in
    1) /vendor/bin/init.wifi.sh
       ;;
    *) setprop ctl.start dhcpclient_def
       ;;
esac

# set up the second interface (for inter-emulator connections)
# if required
my_ip=`getprop net.shared_net_ip`
case "$my_ip" in
    "")
    ;;
    *) ifconfig eth1 "$my_ip" netmask 255.255.255.0 up
    ;;
esac