YaST2 Developers Documentation: yast2



functions
files
intro

yast2

modules/Hostname.ycp
Hostname manipulation routines

Imports

  • IP

Global Functions

global ValidDomain () -> string

Return value:
describe a valid domain name

global ValidFQ () -> string

Return value:
describe a valid FQ host name

global Check (string host) -> boolean

Check syntax of hostname entry (that is a domain name component, unqualified, without dots)

Parameters:
host hostname
Return value:
true if correct
See:
rfc1123, rfc2396 and obsoleted rfc1034

global CheckDomain (string domain) -> boolean

Check syntax of domain entry

Parameters:
domain domain name
Return value:
true if correct

global CheckFQ (string host) -> boolean

Check syntax of fully qualified hostname

Parameters:
host hostname
Return value:
true if correct

global SplitFQ (string fqhostname) -> list<string>

Split FQ hostname to hostname and domain name

Parameters:
fqhostname FQ hostname
Return value:
of hostname and domain name
Example:
  Hostname::SplitFQ("ftp.suse.cz") -> ["ftp", "suse.cz"]
  Hostname::SplitFQ("ftp") -> ["ftp"]

global MergeFQ (string hostname, string domain) -> string

Merge short hostname and domain to full-qualified host name

Parameters:
hostname short host name
domain domain name
Return value:
FQ hostname

YaST2 Developers Documentation