nerves_interim_wifi v0.2.0 Nerves.InterimWiFi.Resolvconf

This module manages the contents of “/etc/resolv.conf”. This file is used by the C library for resolving domain names and must be kept up-to-date as links go up and down. This module assumes exclusive ownership on “/etc/resolv.conf”, so if any other code in the system tries to modify the file, their changes will be lost on the next update.

Summary

Functions

Clear all entries in “/etc/resolv.conf” that are associated with the specified interface

Completely clear out “/etc/resolv.conf”

Return the default resolve.conf path for this system

Set the search domain for non fully qualified domain name lookups

Set the nameservers that were configured on this interface. These will be added to “/etc/resolv.conf” and replace any entries that were previously added for the specified interface

Set all of the options for this interface in one shot. The following options are available

Functions

clear(pid, ifname)

Clear all entries in “/etc/resolv.conf” that are associated with the specified interface.

clear_all(pid)

Completely clear out “/etc/resolv.conf”.

default_resolvconf_path()

Return the default resolve.conf path for this system.

set_domain(pid, ifname, domain)

Set the search domain for non fully qualified domain name lookups.

set_nameservers(pid, ifname, servers)

Set the nameservers that were configured on this interface. These will be added to “/etc/resolv.conf” and replace any entries that were previously added for the specified interface.

setup(pid, ifname, options)

Set all of the options for this interface in one shot. The following options are available:

  • :domain - the local domain name
  • :nameservers - a list of IP addresses of name servers

Options can be specified either as a keyword list or as a map. E.g.,

%{domain: “example.com”, nameservers: [“8.8.8.8”, “8.8.4.4”]}

start_link(resolvconf_path \\ "/etc/resolv.conf", opts \\ [])