bin/pvl.dhcp-conf
changeset 376 31d9ae0c1dab
parent 321 e931ff718ead
equal deleted inserted replaced
375:df3bf49634a1 376:31d9ae0c1dab
    19     """
    19     """
    20 
    20 
    21     file = pvl.args.apply_file(conf, 'r')
    21     file = pvl.args.apply_file(conf, 'r')
    22     return pvl.dhcp.config.DHCPConfigParser.load(file)
    22     return pvl.dhcp.config.DHCPConfigParser.load(file)
    23 
    23 
       
    24 QUOTE_ITEMS = set((
       
    25     'filename',
       
    26 ))
       
    27 
    24 def process_dhcp_items (options, block, items) :
    28 def process_dhcp_items (options, block, items) :
    25     """
    29     """
    26         Yield items for output from given input items
    30         Yield items for output from given input items
    27     """
    31     """
    28 
    32 
    37             if options.include_path :
    41             if options.include_path :
    38                 include = os.path.join(options.include_path, include)
    42                 include = os.path.join(options.include_path, include)
    39                 log.info("include: %s", include)
    43                 log.info("include: %s", include)
    40 
    44 
    41             yield 'include', '"{include}"'.format(include=include)
    45             yield 'include', '"{include}"'.format(include=include)
       
    46 
       
    47         elif name in QUOTE_ITEMS :
       
    48             yield name, ' '.join('"{arg}"'.format(arg=arg) for arg in args)
       
    49 
    42         else :
    50         else :
    43             yield item
    51             yield item
    44 
    52 
    45 def process_dhcp_block (options, block, items, blocks) :
    53 def process_dhcp_block (options, block, items, blocks) :
    46     """
    54     """