54. .etc.resolv_conf

Agent for reading/writing /etc/resolv.conf

54.1. Description

The target agent is the SCR interface to /etc/resolv.conf, the resolver (name server) configuration file. Using "search, "nameserver", "domain", "sortlist" and "options" as subpaths, the respective values can be read/written. Info paths can be read/written using "modified", "backup", "process", "process_id", "script" and "info" as subpaths of .etc.resolv_conf. For more information see the agent's own documentation.

Access type: read / write

File Name: /usr/share/YaST2/scrconf/etc_resolv_conf.scr

See: resolv.conf(5) source/core/agent-resolver/doc/resolveragent.txt

54.2. Usage

Example 30. 

Read(.etc.resolv_conf.domain)
("suse.de")
Read(.etc.resolv_conf.nameserver)
(["10.10.0.1", "10.10.10.1", "10.10.11.1"])
Write(.etc.resolv_conf.domain, "suse.de")
(true)