YaST2 Developers Documentation: Network configuration

Network configuration

modules/DNS.ycp
Hostname and DNS data
  • Michal Svec

This module has an unstable interface.

Manages resolv.conf and (fully qualified) hostname, also respecting DHCP.

Imports

  • Hostname
  • IP
  • NetHwDetection
  • NetworkInterfaces
  • ProductFeatures
  • Progress
  • Service
  • String
  • Summary

Includes

  • network/routines.ycp
  • network/runtime.ycp

Global Variables

Global Functions

Local Variables

Local Functions

global proposal_valid -> boolean

Should the hostname be proposed? #152218

global hostname -> string

Short Hostname

global domain -> string

Domain Name (not including the host part)

global modified -> boolean

Data was modified?

global ReadNameserver (string ns) -> boolean

Use the parameter, coming usually from install.inf, if it is defined. Used when there is nothing better.

Parameters:
ns ip of the nameserver
Return value:
true if success
global ReadHostDomain (string hn, string dn) -> boolean

Use this host and domain name, if they are defined

Parameters:
hn hostname
dn domain name
Return value:
true if the hostname has been assigned
local ResolveIP (string ip) -> string

Resolve IP to hostname

Parameters:
ip given IP address
Return value:
resolved host
local resolv_conf -> string

resolver config file location

local initialized -> boolean

True if DNS is already read

global Read () -> boolean

Reads current DNS and hostname settings Includes Host,NetworkConfig::Read

Return value:
true if success
global Write () -> boolean

Write new DNS and hostname settings Includes Host,NetworkConfig::Write

Return value:
true if success
global Import (map settings) -> boolean

Get all the DNS configuration from a map. When called by dns_auto (preparing autoinstallation data) the map may be empty.

Parameters:
settings autoinstallation settings
Return value:
true if success
global Export () -> map

Dump the DNS settings to a map, for autoinstallation use.

Return value:
autoinstallation settings
global Summary () -> string

Create DNS text summary

Return value:
summary text
global IsHostLocal (string check_host) -> boolean

Check if hostname or IP address is local computer Used to determine if LDAP server is local (and it should be checked if required schemes are included Calls Read () function before querying any data

Parameters:
check_host string hostname or IP address to check
Return value:
true if hostname is local host