From f6d9d626a985e64ae9f12602b294c8c263dbc35a Mon Sep 17 00:00:00 2001 From: Dan Walsh Date: Thu, 13 Oct 2016 09:25:31 -0400 Subject: [PATCH] Cleanup help and add options to man page Missing options from man page, and sort options alphabetically, as best we can. Signed-off-by: Dan Walsh --- cmd/server/main.go | 52 +++++++++++++++++++++++----------------------- docs/ocid.8.md | 4 ++++ 2 files changed, 30 insertions(+), 26 deletions(-) diff --git a/cmd/server/main.go b/cmd/server/main.go index 7c056fa0..41f35814 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -34,6 +34,9 @@ func mergeConfig(config *server.Config, ctx *cli.Context) error { if ctx.GlobalIsSet("conmon") { config.Conmon = ctx.GlobalString("conmon") } + if ctx.GlobalIsSet("containerdir") { + config.ContainerDir = ctx.GlobalString("containerdir") + } if ctx.GlobalIsSet("pause") { config.Pause = ctx.GlobalString("pause") } @@ -43,9 +46,6 @@ func mergeConfig(config *server.Config, ctx *cli.Context) error { if ctx.GlobalIsSet("sandboxdir") { config.SandboxDir = ctx.GlobalString("sandboxdir") } - if ctx.GlobalIsSet("containerdir") { - config.ContainerDir = ctx.GlobalString("containerdir") - } if ctx.GlobalIsSet("listen") { config.Listen = ctx.GlobalString("listen") } @@ -77,37 +77,17 @@ func main() { Name: "conmon", Usage: "path to the conmon executable", }, - cli.StringFlag{ - Name: "pause", - Usage: "path to the pause executable", - }, - cli.StringFlag{ - Name: "root", - Usage: "ocid root dir", - }, - cli.StringFlag{ - Name: "sandboxdir", - Usage: "ocid pod sandbox dir", - }, cli.StringFlag{ Name: "containerdir", Usage: "ocid container dir", }, - cli.StringFlag{ - Name: "listen", - Usage: "path to ocid socket", - }, - cli.StringFlag{ - Name: "runtime", - Usage: "OCI runtime path", - }, cli.BoolFlag{ Name: "debug", Usage: "enable debug output for logging", }, - cli.BoolFlag{ - Name: "selinux", - Usage: "enable selinux support", + cli.StringFlag{ + Name: "listen", + Usage: "path to ocid socket", }, cli.StringFlag{ Name: "log", @@ -119,6 +99,26 @@ func main() { Value: "text", Usage: "set the format used by logs ('text' (default), or 'json')", }, + cli.StringFlag{ + Name: "pause", + Usage: "path to the pause executable", + }, + cli.StringFlag{ + Name: "root", + Usage: "ocid root dir", + }, + cli.StringFlag{ + Name: "runtime", + Usage: "OCI runtime path", + }, + cli.StringFlag{ + Name: "sandboxdir", + Usage: "ocid pod sandbox dir", + }, + cli.BoolFlag{ + Name: "selinux", + Usage: "enable selinux support", + }, } app.Commands = []cli.Command{ diff --git a/docs/ocid.8.md b/docs/ocid.8.md index 2b0516c5..c0bd0d92 100644 --- a/docs/ocid.8.md +++ b/docs/ocid.8.md @@ -6,6 +6,7 @@ ocid - Enable OCI Kubernetes Container Runtime daemon # SYNOPSIS **ocid** +[**--config**=[*value*]] [**--conmon**=[*value*]] [**--containerdir**=[*value*]] [**--debug**] @@ -38,6 +39,9 @@ ocid is meant to provide an integration path between OCI conformant runtimes and # GLOBAL OPTIONS +**--config**="" + path to configuration file + **--conmon**="" path to the conmon executable (default: "/usr/libexec/ocid/conmon")