aboutsummaryrefslogtreecommitdiffstats
path: root/dhcpcd-hooks/95-configured
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2008-10-21 07:00:00 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2008-10-21 07:00:00 -0700
commite95877ecfa1170d77b1ec1f66752725cdda01b64 (patch)
tree81940f62fdf7891f127a1d1ffa712ac1ea1c4c5c /dhcpcd-hooks/95-configured
downloadexternal_dhcpcd-e95877ecfa1170d77b1ec1f66752725cdda01b64.zip
external_dhcpcd-e95877ecfa1170d77b1ec1f66752725cdda01b64.tar.gz
external_dhcpcd-e95877ecfa1170d77b1ec1f66752725cdda01b64.tar.bz2
Initial Contribution
Diffstat (limited to 'dhcpcd-hooks/95-configured')
-rw-r--r--dhcpcd-hooks/95-configured22
1 files changed, 22 insertions, 0 deletions
diff --git a/dhcpcd-hooks/95-configured b/dhcpcd-hooks/95-configured
new file mode 100644
index 0000000..1ff07cf
--- /dev/null
+++ b/dhcpcd-hooks/95-configured
@@ -0,0 +1,22 @@
+# This script runs last, after all network configuration
+# has completed. It sets a property to let the framework
+# know that setting up the interface is complete.
+
+# For debugging:
+setprop dhcp.${interface}.reason "${reason}"
+
+case "${reason}" in
+BOUND|INFORM|REBIND|REBOOT|RENEW|TIMEOUT)
+ setprop dhcp.${interface}.ipaddress "${new_ip_address}"
+ setprop dhcp.${interface}.gateway "${new_routers%% *}"
+ setprop dhcp.${interface}.mask "${new_subnet_mask}"
+ setprop dhcp.${interface}.leasetime "${new_dhcp_lease_time}"
+ setprop dhcp.${interface}.server "${new_dhcp_server_identifier}"
+
+ setprop dhcp.${interface}.result "ok"
+ ;;
+
+EXPIRE|FAIL|IPV4LL|RELEASE|STOP)
+ setprop dhcp.${interface}.result "failed"
+ ;;
+esac