Clarify the semantics of hook elements

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
This commit is contained in:
Qiang Huang 2015-11-25 08:02:32 +08:00
parent 4066d59d29
commit 48049d2341
1 changed files with 3 additions and 2 deletions

View File

@ -43,7 +43,7 @@ If a hook returns a non-zero exit code, then an error is logged and the remainin
"prestart": [ "prestart": [
{ {
"path": "/usr/bin/fix-mounts", "path": "/usr/bin/fix-mounts",
"args": ["arg1", "arg2"], "args": ["fix-mounts", "arg1", "arg2"],
"env": [ "key1=value1"] "env": [ "key1=value1"]
}, },
{ {
@ -58,7 +58,7 @@ If a hook returns a non-zero exit code, then an error is logged and the remainin
"poststop": [ "poststop": [
{ {
"path": "/usr/sbin/cleanup.sh", "path": "/usr/sbin/cleanup.sh",
"args": ["-f"] "args": ["cleanup.sh", "-f"]
} }
] ]
} }
@ -66,6 +66,7 @@ If a hook returns a non-zero exit code, then an error is logged and the remainin
`path` is required for a hook. `path` is required for a hook.
`args` and `env` are optional. `args` and `env` are optional.
The semantics are the same as `Path`, `Args` and `Env` in [golang Cmd](https://golang.org/pkg/os/exec/#Cmd).
## Mount Configuration ## Mount Configuration