# Set net.<iface>.winsN properties that contain the
# Domain Search list stored on the DHCP server.

set_domain_suffix_props()
{
    case "${new_domain_search}" in
    "")   return 0;;
    esac
          setprop dhcp.${interface}.domain_suffix ""

          setprop dhcp.${interface}.domain_suffix "${new_domain_search}"
}

unset_domain_suffix_props()
{
        setprop dhcp.${interface}.domain_suffix ""
}

case "${reason}" in
BOUND|INFORM|REBIND|REBOOT|RENEW|TIMEOUT|IPV4LL)       set_domain_suffix_props;;
EXPIRE|FAIL|RELEASE|STOP)                unset_domain_suffix_props;;
esac
