ACC SHELL
// library/network/agents/network.scr. Generated from network.scr.in by configure.
/**
* File: network.scr
* Summary: Agent for /etc/sysconfig/network/ifcfg-*
* Author: Michal Svec <msvec@suse.cz>
* Modified: Wenji Huang <wenji.huang@oracle.com>
* Access: read / write
* See: sysconfig.rpm
*
* General syntax:
* # comment0
* VAR1=val1 # comment1
* VAR2="val 2 #blah" # comment2
* VAR3='val3 x #blah2' # comment3
*
* $Id: network.scr.in 61236 2010-03-10 15:39:50Z mvidner $
*
* <p>Reads/writes <tt>/etc/sysconfig/network/ifcfg-*</tt>. For more details
* see its own documentation.</p>
*/
.network
`ag_ini(
`IniAgent( [ "/etc/sysconfig/network/ifcfg-*" ],
$[
/* values at the top level, allow comments after value */
"options" : [ "global_values", "comments_last" ],
/* empty lines, comments after value and whole-line comments */
"comments" : [ "^[ \t]*$", "[ \t]*#.*$", "^[ \t]*#.*$" ],
/* matching rules */
"params" : [
/* VAR1="val1 'bal x" */
$[ "match" : [ "^[ \t]*([a-zA-Z_][a-zA-Z0-9_]*)=\"([^\"`\\$]*)\"", "%s='%s'" ] ],
/* VAR1='val1 xxx" xx' */
$[ "match" : [ "^[ \t]*([a-zA-Z_][a-zA-Z0-9_]*)='([^']*)'", "%s='%s'" ] ],
/* VAR1=val1 */
$[ "match" : [ "^[ \t]*([a-zA-Z_][a-zA-Z0-9_]*)=([^ \t\"$`'\\#]*)", "%s='%s'" ] ],
],
/* matching rules */
"rewrite" : [
[ "/etc/sysconfig/network/ifcfg-(.*)", "/etc/sysconfig/network/ifcfg-%s" ],
],
]
))
ACC SHELL 2018