Skip to content

Commit 2f7d834

Browse files
author
Ma Shimiao
committed
fix hooks man and help
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
1 parent 4b20669 commit 2f7d834

File tree

2 files changed

+18
-15
lines changed

2 files changed

+18
-15
lines changed

cmd/oci-runtime-tool/generate.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ var generateFlags = []cli.Flag{
5353
cli.StringFlag{Name: "os", Value: runtime.GOOS, Usage: "operating system the container is created for"},
5454
cli.StringFlag{Name: "output", Usage: "output file (defaults to stdout)"},
5555
cli.StringFlag{Name: "pid", Usage: "pid namespace"},
56-
cli.StringSliceFlag{Name: "poststart", Usage: "path to poststart hooks"},
57-
cli.StringSliceFlag{Name: "poststop", Usage: "path to poststop hooks"},
58-
cli.StringSliceFlag{Name: "prestart", Usage: "path to prestart hooks"},
56+
cli.StringSliceFlag{Name: "poststart", Usage: "set command to run in poststart hooks"},
57+
cli.StringSliceFlag{Name: "poststop", Usage: "set command to run in poststop hooks"},
58+
cli.StringSliceFlag{Name: "prestart", Usage: "set command to run in prestart hooks"},
5959
cli.BoolFlag{Name: "privileged", Usage: "enable privileged container settings"},
6060
cli.BoolFlag{Name: "read-only", Usage: "make the container's rootfs read-only"},
6161
cli.StringFlag{Name: "root-propagation", Usage: "mount propagation for root"},

man/oci-runtime-tool-generate.1.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -182,18 +182,21 @@ read the configuration from `config.json`.
182182
The special *PATH* `host` removes any existing PID namespace from
183183
the configuration.
184184

185-
**--poststart**=CMD
186-
Path to command to run in poststart hooks. This command will be run before
187-
the container process gets launched but after the container environment and
188-
main process has been created.
189-
190-
**--poststop**=CMD
191-
Path to command to run in poststop hooks. The command will be run
192-
after the container process is stopped.
193-
194-
**--prestart**=CMD
195-
Path to command to run in prestart hooks. This command will be run before
196-
the container process gets launched but after the container environment.
185+
**--poststart**=CMD[:ARGS...]
186+
Set command to run in poststart hooks. Can be specified multiple times.
187+
The multiple commands will be run in order before the container process
188+
gets launched but after the container environment and main process has been
189+
created.
190+
191+
**--poststop**=CMD[:ARGS...]
192+
Set command to run in poststop hooks. Can be specified multiple times.
193+
The multiple commands will be run in order after the container process
194+
is stopped.
195+
196+
**--prestart**=CMD[:ARGS...]
197+
Set command to run in prestart hooks. Can be specified multiple times.
198+
The multiple commands will be run in order after the container process
199+
has been created but before it executes the user-configured code.
197200

198201
**--privileged**=true|false
199202
Give extended privileges to this container. The default is *false*.

0 commit comments

Comments
 (0)