Skip to content

Commit 237e4ae

Browse files
author
Ma Shimiao
committed
fix hooks man and help
Signed-off-by: Ma Shimiao <[email protected]>
1 parent 96609ba commit 237e4ae

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
@@ -40,9 +40,9 @@ var generateFlags = []cli.Flag{
4040
cli.StringFlag{Name: "cgroups-path", Usage: "specify the path to the cgroups"},
4141
cli.StringFlag{Name: "mount-cgroups", Value: "no", Usage: "mount cgroups (rw,ro,no)"},
4242
cli.StringSliceFlag{Name: "bind", Usage: "bind mount directories src:dest:(rw,ro)"},
43-
cli.StringSliceFlag{Name: "prestart", Usage: "path to prestart hooks"},
44-
cli.StringSliceFlag{Name: "poststart", Usage: "path to poststart hooks"},
45-
cli.StringSliceFlag{Name: "poststop", Usage: "path to poststop hooks"},
43+
cli.StringSliceFlag{Name: "prestart", Usage: "set command to run in prestart hooks"},
44+
cli.StringSliceFlag{Name: "poststart", Usage: "set command to run in poststart hooks"},
45+
cli.StringSliceFlag{Name: "poststop", Usage: "set command to run in poststop hooks"},
4646
cli.StringFlag{Name: "root-propagation", Usage: "mount propagation for root"},
4747
cli.StringFlag{Name: "os", Value: runtime.GOOS, Usage: "operating system the container is created for"},
4848
cli.StringFlag{Name: "arch", Value: runtime.GOARCH, Usage: "architecture the container is created for"},

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

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

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

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

0 commit comments

Comments
 (0)