yast2 |
modules/Hostname.ycp |
Hostname manipulation routines | |
|
|
This module has an unstable interface. |
Imports
Global VariablesGlobal 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
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
global
CurrentFQ ()
->
string
Retrieve currently set fully qualified hostname (uses hostname --fqdn)
- Return value:
-
FQ hostname
global
CurrentHostname ()
->
string
Retrieve currently set (short) hostname
- Return value:
-
hostname
global
CurrentDomain ()
->
string
Retrieve currently set domain name
- Return value:
-
domain