chiark / gitweb /
make-secnet-sites: Provide explicit --conf mode option
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 4 Dec 2019 16:35:44 +0000 (16:35 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 15 Feb 2020 21:56:53 +0000 (21:56 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
README.make-secnet-sites
make-secnet-sites

index aa4b216..098cc8e 100644 (file)
@@ -1,6 +1,6 @@
 USAGE
 
-       make-secnet-sites [-P PREFIX] [IN [OUT]]
+       make-secnet-sites [-P PREFIX] [--conf] [IN [OUT]]
        make-secnet-sites -u HEADER GRPDIR SITESFILE GROUP
 
        The `-P' option sets the PREFIX string, mentioned below in
index 93bfc10..6e76636 100755 (executable)
@@ -312,6 +312,8 @@ class OpBase():
                os.rename(self.sitesfile+"-tmp",self.sitesfile)
 
 class OpConf(OpBase):
+       opts = ['--conf']
+       help = 'sites.conf generation mode (default)'
        def is_service(self): return 0
        def positional_args(self, av):
                if len(av.arg)>3:
@@ -402,6 +404,7 @@ def parse_args():
                        nargs=0,
                        fn=(lambda v,ns,*x: setattr(ns,'opmode',how)),
                        help=how().help)
+       add_opmode(OpConf)
        add_opmode(OpUserv)
        ap.add_argument('--conf-key-prefix', action=ActionNoYes,
                        default=True,