YaST2 Developers Documentation: yast2

yast2

modules/Hostname.ycp
Hostname manipulation routines

This module has an unstable interface.

Imports

  • IP

Global Variables

Global Functions

global ValidChars -> string

i18n characters in domain names are still not allowed

global ValidDomain () -> string

describe a valid domain name

Return value:
description
global ValidHost () -> string

describe a valid host name

Return value:
description
global ValidFQ () -> string

describe a valid FQ host name

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