Commit | Line | Data |
---|---|---|
d05bb22f S |
1 | # This script runs last, after all network configuration |
2 | # has completed. It sets a property to let the framework | |
3 | # know that setting up the interface is complete. | |
4 | ||
5 | if [[ $interface == p2p* ]] | |
6 | then | |
7 | intf=p2p | |
8 | else | |
9 | intf=$interface | |
10 | fi | |
11 | ||
12 | # For debugging: | |
13 | setprop dhcp.${intf}.reason "${reason}" | |
14 | ||
15 | case "${reason}" in | |
16 | #BOUND|INFORM|REBIND|REBOOT|RENEW|TIMEOUT) | |
17 | BOUND|INFORM|REBIND|REBOOT|RENEW|TIMEOUT|IPV4LL) | |
18 | setprop dhcp.${intf}.ipaddress "${new_ip_address}" | |
19 | setprop dhcp.${intf}.gateway "${new_routers%% *}" | |
20 | setprop dhcp.${intf}.mask "${new_subnet_mask}" | |
21 | setprop dhcp.${intf}.leasetime "${new_dhcp_lease_time}" | |
22 | setprop dhcp.${intf}.server "${new_dhcp_server_identifier}" | |
23 | setprop dhcp.${intf}.vendorInfo "${new_vendor_encapsulated_options}" | |
24 | setprop dhcp.${intf}.mtu "${new_interface_mtu}" | |
25 | ||
26 | setprop dhcp.${intf}.result "ok" | |
27 | ;; | |
28 | ||
29 | ||
30 | #EXPIRE|FAIL|IPV4LL|STOP) | |
31 | EXPIRE|FAIL|STOP) | |
32 | setprop dhcp.${intf}.result "failed" | |
33 | ;; | |
34 | ||
35 | RELEASE) | |
36 | setprop dhcp.${intf}.result "released" | |
37 | ;; | |
38 | esac |