// @configure_input@
/**
 * File:	network.scr
 * Summary:	Agent for @IFCFG_DIR@/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$
 *
 * <p>Reads/writes <tt>@IFCFG_DIR@/ifcfg-*</tt>. For more details
 * see its own documentation.</p>
 */
.network

`ag_ini(
    `IniAgent( [ "@IFCFG_DIR@/ifcfg-*" ],
	$[
	    /* values at the top level, allow comments after value */
	    "options"	: [ "global_values", "comments_last", "shell_quoted_value" ],
	    /* empty lines, comments after value and whole-line comments */
	    "comments"	: [ "^[ \t]*$", "[ \t]*#.*$", "^[ \t]*#.*$" ],
	    /* matching rules */
	    "params"	: [
                $[ "match" : [ "^[ \t]*([a-zA-Z_][a-zA-Z0-9_]*)=[ \t]*(.*)[ \t]*", "%s=%s" ] ],
	    ],
	    /* matching rules */
	    "rewrite"	: [
		[ "@IFCFG_DIR@/ifcfg-(.*)", "@IFCFG_DIR@/ifcfg-%s" ],
	    ],
	]
))
