Skip to content

Commit a66cd0d

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

File tree

2 files changed

+18
-15
lines changed

2 files changed

+18
-15
lines changed

cmd/ocitools/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/ocitools-generate.1.md

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

140-
**--poststart**=CMD
141-
Path to command to run in poststart hooks. This command will be run before
142-
the container process gets launched but after the container environment and
143-
main process has been created.
144-
145-
**--poststop**=CMD
146-
Path to command to run in poststop hooks. The command will be run
147-
after the container process is stopped.
148-
149-
**--prestart**=CMD
150-
Path to command to run in prestart hooks. This command will be run before
151-
the container process gets launched but after the container environment.
140+
**--poststart**=CMD[:ARGS...]
141+
Set command to run in poststart hooks. Can be specified multiple times.
142+
The multiple commands will be run in order before the container process
143+
gets launched but after the container environment and main process has been
144+
created.
145+
146+
**--poststop**=CMD[:ARGS...]
147+
Set command to run in poststop hooks. Can be specified multiple times.
148+
The multiple commands will be run in order after the container process
149+
is stopped.
150+
151+
**--prestart**=CMD[:ARGS...]
152+
Set command to run in prestart hooks. Can be specified multiple times.
153+
The multiple commands will be run in order after the container process
154+
has been created but before it executes the user-configured code.
152155

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

0 commit comments

Comments
 (0)