aboutsummaryrefslogtreecommitdiffstats
path: root/dhcpcd-hooks/95-configured
blob: d67236a08a5d4da1cebc3547921d2d67959f84db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# 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}.vendorInfo "${new_vendor_encapsulated_options}"

    setprop dhcp.${interface}.result "ok"
    ;;

EXPIRE|FAIL|IPV4LL|STOP)
    setprop dhcp.${interface}.result "failed"
    ;;

RELEASE)
    setprop dhcp.${interface}.result "released"
    ;;
esac