Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace colon by comma as separator #524

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cmd/oci-runtime-tool/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,7 @@ func parseHugepageLimit(pageLimit string) (string, uint64, error) {

func parseHook(s string) (string, []string, error) {
args := []string{}
parts := strings.Split(s, ":")
parts := strings.Split(s, ",")
if len(parts) > 1 && parts[0] == "" {
return "", args, fmt.Errorf("invalid hook value: %s", s)
}
Expand All @@ -818,7 +818,7 @@ func parseHook(s string) (string, []string, error) {
}

func parseHookEnv(s string) (string, []string, error) {
parts := strings.Split(s, ":")
parts := strings.Split(s, ",")
envs := []string{}
if len(parts) < 2 {
return "", envs, fmt.Errorf("invalid format: %s", s)
Expand All @@ -829,7 +829,7 @@ func parseHookEnv(s string) (string, []string, error) {
}

func parseHookTimeout(s string) (string, int, error) {
parts := strings.Split(s, ":")
parts := strings.Split(s, ",")
if len(parts) != 2 {
return "", 0, fmt.Errorf("invalid format: %s", s)
}
Expand Down
18 changes: 9 additions & 9 deletions man/oci-runtime-tool-generate.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,44 +41,44 @@ read the configuration from `config.json`.
**--hostname**=""
Set the container host name that is available inside the container.

**--hooks-poststart**=CMD[:ARGS...]
**--hooks-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.

**--hooks-poststart-env**=[]
Set environment variables for commands in poststart hooks, format is CMD:ENV. e.g. --hooks-poststart-env=/bin/test:key=value
Set environment variables for commands in poststart hooks, format is CMD,ENV. e.g. --hooks-poststart-env=/bin/test,key=value
This option can be specified multiple times. When same CMD specified over once, the last one make sense.

**--hooks-poststart-timeout**=[]
Set timeout for commands in poststart hooks, format is CMD:TIMEOUT. e.g. --hooks-poststart-timeout=/bin/test:5
Set timeout for commands in poststart hooks, format is CMD,TIMEOUT. e.g. --hooks-poststart-timeout=/bin/test,5
This option can be specified multiple times. When same CMD specified over once, the last one make sense.

**--hooks-poststop**=CMD[:ARGS...]
**--hooks-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.

**--hook-poststop-env**=[]
Set environment variables for commands in poststop hooks, format is CMD:ENV. e.g. --hooks-poststop-env=/bin/test:key=value
Set environment variables for commands in poststop hooks, format is CMD,ENV. e.g. --hooks-poststop-env=/bin/test,key=value
This option can be specified multiple times. When same CMD specified over once, the last one make sense.

**--hooks-poststop-timeout**=[]
Set timeout for commands in poststop hooks, format is CMD:TIMEOUT. e.g. --hooks-poststop-timeout=/bin/test:5
Set timeout for commands in poststop hooks, format is CMD,TIMEOUT. e.g. --hooks-poststop-timeout=/bin/test,5
This option can be specified multiple times. When same CMD specified over once, the last one make sense.

**--hooks-prestart**=CMD[:ARGS...]
**--hooks-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.

**--hooks-prestart-env**=[]
Set environment variables for commands in prestart hooks, format is CMD:ENV. e.g. --hooks-prestart-env=/bin/test:key=value
Set environment variables for commands in prestart hooks, format is CMD,ENV. e.g. --hooks-prestart-env=/bin/test,key=value
This option can be specified multiple times. When same CMD specified over once, the last one make sense.

**--hooks-prestart-timeout**=[]
Set timeout for commands in prestart hooks, format is CMD:TIMEOUT. e.g. --hooks-prestart-timeout=/bin/test:5
Set timeout for commands in prestart hooks, format is CMD,TIMEOUT. e.g. --hooks-prestart-timeout=/bin/test,5
This option can be specified multiple times. When same CMD specified over once, the last one make sense.

**--label**=[]
Expand Down