yast/yast-yast2

View on GitHub
library/general/src/scrconf/etc_sysctl_conf.scr

Summary

Maintainability
Test Coverage
/*
 * File:
 *   etc_sysctl_conf.scr
 * Summary:
 *   SCR Agent for reading/writing /etc/sysctl.conf
 * Access:
 *   r/w
 *
 * See 'man sysctl.conf' for more details about the format
 */
.etc.sysctl_conf

`ag_ini(
  `IniAgent(
    "/etc/sysctl.conf",
    $[ "options" : ["ignore_case", "global_values", "flat"],
       "comments" : [ "^#.*", "^;.*", "^[ \t]*$", ],
       "params" : [
         $[ "match" : [ "^[ \t]*([^=]*[^ \t=])[ \t]*=[ \t]*(.*[^ \t]|)[ \t]*$" , "%s = %s"],],
       ]
    ]
    ))