YaST2 Developers Documentation: Misc



functions
files
intro

Misc

Misc.ycp Purpose: miscellaneous definitions for installation
Author: Klaus Kämpf

Global Functions

global ReadAlternateFile (string first, string second) -> any

Parameters:
first string name of first file to try
second string name of second file to try
Return value:
content of file try to read first file, if it doesn't exist, read second files must reside below /usr/lib/YaST2 files must have ycp syntax

global hardware_name (map hardware_entry) -> string

Parameters:
hardware_entry map map of .probe entry
Return value:
vendor and device name common function to extract 'name' of hardware

global translate (map lmap, string lang) -> string

Parameters:
lmap map map of language codes and translations e.g. $[ "default" : "Defaultstring", "de" : "German....", ...]
lang string language as ISO code, either 2 chars (de) or 5 chars (de_DE)
Return value:
translation Define a macro that looks up a localized string in a language map of the form $[ "default" : "Defaultstring", "de" : "German....", ...]

global SysconfigWrite (path level, list<list> values) -> boolean

SysconfigWrite()

Parameters:
level
values

global WriteYaSTInf (map<string,string> linuxrc) -> void

WriteYaSTInf() Write /etc/yast.inf

Parameters:
linuxrc

global SplitOptions (string options, map optmap) -> map

MergeOptions Merges "opt1=val1 opt2=val2 ..." and $["opta":"vala", ..."] to $["opt1":"val1", "opt2":"val2", "opta":"vala", ...] as needed by modules.conf agent

Parameters:
options string module options, e.g. "opt1=val1 opt2=val2 ..."
optmap map possible old options $["opta":"vala", ...] @returns map $["opt1":"val1", "opt2":"val2", ...]

global SysconfigRead (path sysconfig_path, string default) -> string

SysconfigRead() Try an SCR::Read(...) and return the result if successful. On failure return the the second parameter (default value)

Parameters:
sysconfig_path Sysconfig SCR path.
default Default value
Return value:
Success --> Result of SCR::Read
Failure --> Default value

YaST2 Developers Documentation