YaST2 Developers Documentation: HWConfig



functions
files
intro

HWConfig

HWConfig.ycp
Module for accessing hardware configuration files (/etc/sysconfig/hwcfg-*)

Global Functions

global ConfigFiles () -> list<string>

Return list of all available hardware configuration files

Return value:
found files

global Variables (string file) -> list<string>

Return list of all available variable in the configuration file

Parameters:
file to search
Return value:
found variables

global Values (string file) -> map<string,string>

Read all values from the file

Parameters:
file configuration file to read
Return value:
map $[ "VARIABLE" : "value" ]

global SetValue (string file, string variable, string value) -> boolean

Set value of the variable in the config file

Parameters:
file config file
variable name of the variable
value the new value
Return value:
true on success

global GetValue (string file, string variable) -> string

Set comment of the variable in the config file

Parameters:
file config file
variable name of the variable
Return value:
comment the new comment

global SetComment (string file, string variable, string comment) -> boolean

Set comment of the variable in the config file

Parameters:
file config file
variable name of the variable
comment the new comment, the comment must be terminated by "\n" chacter!
Return value:
true on success

global GetComment (string file, string variable) -> string

Get comment of the variable from the config file

Parameters:
file config file
variable name of the variable
Return value:
comment of the variable

global RemoveConfig (string file) -> boolean

Remove configuration file from system

Parameters:
file config name
Return value:
true on success

global Flush () -> boolean

Flush - write the changes to files

Return value:
true on success

YaST2 Developers Documentation