home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / boot / i386 / root / usr / share / YaST2 / scrconf / network.scr < prev    next >
Encoding:
Text File  |  2006-11-29  |  1.3 KB  |  43 lines

  1. /**
  2.  * File:    network.scr
  3.  * Summary:    Agent for /etc/sysconfig/network/ifcfg-*
  4.  * Author:    Michal Svec <msvec@suse.cz>
  5.  * Access:    read / write
  6.  * See:        sysconfig.rpm
  7.  *
  8.  * General syntax:
  9.  *     # comment0
  10.  *     VAR1=val1 # comment1
  11.  *     VAR2="val 2 #blah" # comment2
  12.  *     VAR3='val3 x #blah2' # comment3
  13.  *
  14.  * $Id: network.scr 20267 2004-11-10 09:45:26Z mvidner $
  15.  *
  16.  * <p>Reads/writes <tt>/etc/sysconfig/network/ifcfg-*</tt>. For more details
  17.  * see its own documentation.</p>
  18.  */
  19. .network
  20.  
  21. `ag_ini(
  22.     `IniAgent( [ "/etc/sysconfig/network/ifcfg-*" ],
  23.     $[
  24.         /* values at the top level, allow comments after value */
  25.         "options"    : [ "global_values", "comments_last" ],
  26.         /* empty lines, comments after value and whole-line comments */
  27.         "comments"    : [ "^[ \t]*$", "[ \t]*#.*$", "^[ \t]*#.*$" ],
  28.         /* matching rules */
  29.         "params"    : [
  30.         /* VAR1="val1 'bal x" */
  31.         $[ "match" : [ "^[ \t]*([a-zA-Z_][a-zA-Z0-9_]*)=\"([^\"`\\$]*)\"", "%s='%s'" ] ],
  32.         /* VAR1='val1 xxx" xx' */
  33.         $[ "match" : [ "^[ \t]*([a-zA-Z_][a-zA-Z0-9_]*)='([^']*)'", "%s='%s'" ] ],
  34.         /* VAR1=val1 */
  35.         $[ "match" : [ "^[ \t]*([a-zA-Z_][a-zA-Z0-9_]*)=([^ \t\"$`'\\#]*)", "%s='%s'" ] ],
  36.         ],
  37.         /* matching rules */
  38.         "rewrite"    : [
  39.         [ "/etc/sysconfig/network/ifcfg-(.*)", "/etc/sysconfig/network/ifcfg-%s" ],
  40.         ],
  41.     ]
  42. ))
  43.