X-Git-Url: https://git.llucax.com/software/pymin.git/blobdiff_plain/3a113e91bcbc8e34d9ef66915ccec80e6187332b..05968c86ff71ae5031fd5940cf4807a4b8e71e24:/services/dhcp/__init__.py?ds=sidebyside diff --git a/services/dhcp/__init__.py b/services/dhcp/__init__.py index d493b1c..8f9581f 100644 --- a/services/dhcp/__init__.py +++ b/services/dhcp/__init__.py @@ -1,7 +1,17 @@ # vim: set encoding=utf-8 et sw=4 sts=4 : +from formencode import validators as V +from pymin.config import Option from handler import DhcpHandler +def setup_service(options, config): + options.add_group('dhcp', 'DHCP service', [ + Option('pickle_dir', V.String, metavar='DIR', + help='store persistent data in DIR directory'), + Option('config_dir', V.String, metavar='DIR', + help='write config file in DIR directory'), + ]) + def get_service(config): return DhcpHandler(config.dhcp.pickle_dir, config.dhcp.config_dir)