150. Misc

150.1. Authors

  • Klaus Kaempf <kkaempf@suse.de>

150.2. 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

    150.3. Global Functions

    150.3.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 25. 

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


    150.3.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

    150.3.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 - $["opt1":"val1", "opt2":"val2", ...]

    150.3.4. SysconfigRead

    SysconfigRead()

    Function parameters

    • path sysconfig_path

    • string defaultv

    Return value

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

    150.3.5. SysconfigWrite

    SysconfigWrite()

    Function parameters

    • path level

    • list<list> values

    Return value

    • boolean - false if SCR::Write reported error write list of sysyconfig entries via rcconfig agent

    150.3.6. hardware_name

    Function parameters

    • map hardware_entry

    Return value

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

    150.3.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....", ...]

    150.4. Global Variables

    150.5. Module Requirements

    none