diff --git a/cmd/oci-runtime-tool/generate.go b/cmd/oci-runtime-tool/generate.go index b4c38c8d7..2453fa0da 100644 --- a/cmd/oci-runtime-tool/generate.go +++ b/cmd/oci-runtime-tool/generate.go @@ -53,9 +53,9 @@ var generateFlags = []cli.Flag{ cli.StringFlag{Name: "os", Value: runtime.GOOS, Usage: "operating system the container is created for"}, cli.StringFlag{Name: "output", Usage: "output file (defaults to stdout)"}, cli.StringFlag{Name: "pid", Usage: "pid namespace"}, - cli.StringSliceFlag{Name: "poststart", Usage: "path to poststart hooks"}, - cli.StringSliceFlag{Name: "poststop", Usage: "path to poststop hooks"}, - cli.StringSliceFlag{Name: "prestart", Usage: "path to prestart hooks"}, + cli.StringSliceFlag{Name: "poststart", Usage: "set command to run in poststart hooks"}, + cli.StringSliceFlag{Name: "poststop", Usage: "set command to run in poststop hooks"}, + cli.StringSliceFlag{Name: "prestart", Usage: "set command to run in prestart hooks"}, cli.BoolFlag{Name: "privileged", Usage: "enable privileged container settings"}, cli.BoolFlag{Name: "read-only", Usage: "make the container's rootfs read-only"}, cli.StringFlag{Name: "root-propagation", Usage: "mount propagation for root"}, diff --git a/man/oci-runtime-tool-generate.1.md b/man/oci-runtime-tool-generate.1.md index 678c2cc1d..135f2201b 100644 --- a/man/oci-runtime-tool-generate.1.md +++ b/man/oci-runtime-tool-generate.1.md @@ -182,18 +182,21 @@ read the configuration from `config.json`. The special *PATH* `host` removes any existing PID namespace from the configuration. -**--poststart**=CMD - Path to command to run in poststart hooks. This command will be run before - the container process gets launched but after the container environment and - main process has been created. - -**--poststop**=CMD - Path to command to run in poststop hooks. The command will be run - after the container process is stopped. - -**--prestart**=CMD - Path to command to run in prestart hooks. This command will be run before - the container process gets launched but after the container environment. +**--poststart**=CMD[:ARGS...] + Set command to run in poststart hooks. Can be specified multiple times. + The multiple commands will be run in order before the container process + gets launched but after the container environment and main process has been + created. + +**--poststop**=CMD[:ARGS...] + Set command to run in poststop hooks. Can be specified multiple times. + The multiple commands will be run in order after the container process + is stopped. + +**--prestart**=CMD[:ARGS...] + Set command to run in prestart hooks. Can be specified multiple times. + The multiple commands will be run in order after the container process + has been created but before it executes the user-configured code. **--privileged**=true|false Give extended privileges to this container. The default is *false*.