114. Misc

114.1. Summary of Module Globals

List of Global Functions

  • CustomSysconfigRead - Try to read value from sysconfig file and return the result if successful. Function reads from arbitrary sysconfig file, for which the agent doesn't exist: e.g. from different partition like /mnt/etc/sysconfig/file.

  • ReadAlternateFile -

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

  • SysconfigRead - SysconfigRead()

  • SysconfigWrite - SysconfigWrite()

  • hardware_name -

  • translate -

List of Global Variables

    114.2. Global Functions

    114.2.1. CustomSysconfigRead

    Try to read value from sysconfig file and return the result if successful. Function reads from arbitrary sysconfig file, for which the agent doesn't exist: e.g. from different partition like /mnt/etc/sysconfig/file.

    Function parameters

    • string key

    • string defval

    • string location

    Return value

    • string - Success --> Result of SCR::Read<br> Failure --> Default value

    Example 9. 

     Misc::CustomSysconfigRead ("INSTALLED_LANGUAGES", "", Installation::destdir + "/etc/sysconfig/language");
    


    114.2.2. ReadAlternateFile

    Function parameters

    • string first

    • string second

    Return value

    • any - 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

    114.2.3. SplitOptions

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

    Function parameters

    • string options

    • map optmap

    Return value

    • map

    114.2.4. SysconfigRead

    SysconfigRead()

    Function parameters

    • path sysconfig_path

    • string defaultv

    Return value

    • string - Success --> Result of SCR::Read<br> Failure --> Default value

    114.2.5. SysconfigWrite

    SysconfigWrite()

    Function parameters

    • path level

    • list<list> values

    Return value

    • boolean

    114.2.6. hardware_name

    Function parameters

    • map hardware_entry

    Return value

    • string - vendor and device name common function to extract 'name' of hardware

    114.2.7. translate

    Function parameters

    • map lmap

    • string lang

    Return value

    • string - translation Define a macro that looks up a localized string in a language map of the form $[ "default" : "Defaultstring", "de" : "German....", ...]

    114.3. Global Variables

    114.4. Module Requirements

    none