Exemplo n.º 1
0
def gen_manpage_args(parser):
    man = parser.add_parser("manpage", help=_('Generate SELinux man pages'))

    man.add_argument(
        "-p",
        "--path",
        dest="path",
        default="/tmp",
        help=_("path in which the generated SELinux man pages will be stored"))
    man.add_argument("-o",
                     "--os",
                     dest="os",
                     default=get_os_version(),
                     help=_("name of the OS for man pages"))
    man.add_argument(
        "-w",
        "--web",
        dest="web",
        default=False,
        action="store_true",
        help=_(
            "Generate HTML man pages structure for selected SELinux man page"))
    man.add_argument("-r",
                     "--root",
                     dest="root",
                     default="/",
                     help=_("Alternate root directory, defaults to /"))
    man.add_argument(
        "--source_files",
        dest="source_files",
        default=False,
        action="store_true",
        help=
        _("With this flag, alternative root path needs to include file context files and policy.xml file"
          ))
    group = man.add_mutually_exclusive_group(required=True)
    group.add_argument("-a",
                       "--all",
                       dest="all",
                       default=False,
                       action="store_true",
                       help=_("All domains"))
    group.add_argument("-d",
                       "--domain",
                       nargs="+",
                       action=CheckDomain,
                       help=_("Domain name(s) of man pages to be created"))
    man.set_defaults(func=manpage)
Exemplo n.º 2
0
def gen_manpage_args(parser):
        man = parser.add_parser("manpage",
                                   help=_('Generate SELinux man pages'))

        man.add_argument("-p", "--path", dest="path", default="/tmp",
                         help=_("path in which the generated SELinux man pages will be stored"))
        man.add_argument("-o", "--os", dest="os", default=get_os_version(),
                         help=_("name of the OS for man pages"))
        man.add_argument("-w", "--web", dest="web", default=False, action="store_true",
                                help=_("Generate HTML man pages structure for selected SELinux man page"))
        group = man.add_mutually_exclusive_group(required=True)
        group.add_argument("-a", "--all", dest="all", default=False,
                           action="store_true",
                           help=_("All domains"))
        group.add_argument("-d", "--domain", nargs="+",
                           action=CheckDomain,
                           help=_("Domain name(s) of man pages to be created"))
        man.set_defaults(func=manpage)
Exemplo n.º 3
0
def gen_manpage_args(parser):
    man = parser.add_parser("manpage",
                            help=_('Generate SELinux man pages'))

    man.add_argument("-p", "--path", dest="path", default="/tmp",
                     help=_("path in which the generated SELinux man pages will be stored"))
    man.add_argument("-o", "--os", dest="os", default=get_os_version(),
                     help=_("name of the OS for man pages"))
    man.add_argument("-w", "--web", dest="web", default=False, action="store_true",
                     help=_("Generate HTML man pages structure for selected SELinux man page"))
    man.add_argument("-r", "--root", dest="root", default="/",
                     help=_("Alternate root directory, defaults to /"))
    man.add_argument("--source_files", dest="source_files", default=False, action="store_true",
                     help=_("With this flag, alternative root path needs to include file context files and policy.xml file"))
    group = man.add_mutually_exclusive_group(required=True)
    group.add_argument("-a", "--all", dest="all", default=False,
                       action="store_true",
                       help=_("All domains"))
    group.add_argument("-d", "--domain", nargs="+",
                       action=CheckDomain,
                       help=_("Domain name(s) of man pages to be created"))
    man.set_defaults(func=manpage)