/**
 * File:	etc_login_defs.scr
 * Summary:	Agent for reading/writing /etc/login.defs
 * Author:	Michal Svec <msvec@suse.cz>
 * Access:	read / write
 *
 * Example:
 *   Dir(.etc.login_defs)
 *   (["FAIL_DELAY", "FAILLOG_ENAB", ...])
 **
 *   Read(.etc.login_defs.FAIL_DELAY)
 *   ("3")
 **
 *   Write(.etc.login_defs.FAIL_DELAY, "1")
 *   (true)
 *
 * $Id: etc_login_defs.scr 12455 2003-10-22 12:24:49Z visnov $
 *
 * Read/Sets the values defined in <tt>/etc/login.defs</tt>
 * in an easy manner.
 */
.etc.login_defs

`ag_ini(
    `IniAgent( "/etc/login.defs",
	$[
	    "options"	: [ "global_values", "flat" ],
	    "comments"	: [ "^#.*", "^[ \t]*$", ],
	    "params"	: [
		/* quoted values */
		$[ "match" : [
		    "^[ \t]*([a-zA-Z0-9_]+)[ \t]+\"([^\"]*)\"",
		    "%s\t\"%s\"",
		]],
		/* unquoted values */
		$[ "match" : [
		    "^[ \t]*([a-zA-Z0-9_]+)[ \t]+(.*[^ \t]|)[ \t]*$",
		    "%s\t%s",
		]]
	    ]
	]
))
