From a477a8ff755e2807d0745b207d6a5bf57de58e4c Mon Sep 17 00:00:00 2001 From: Qi Wang Date: Thu, 11 Apr 2019 15:59:30 -0400 Subject: Add variable for global flags to runlabel use $GLOBAL_OPTS to pass global flags to the runlabel command. Signed-off-by: Qi Wang --- cmd/podman/shared/funcs.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cmd/podman/shared/funcs.go') diff --git a/cmd/podman/shared/funcs.go b/cmd/podman/shared/funcs.go index 70d041fd2..c189cceeb 100644 --- a/cmd/podman/shared/funcs.go +++ b/cmd/podman/shared/funcs.go @@ -41,7 +41,7 @@ func substituteCommand(cmd string) (string, error) { } // GenerateCommand takes a label (string) and converts it to an executable command -func GenerateCommand(command, imageName, name string) ([]string, error) { +func GenerateCommand(command, imageName, name, globalOpts string) ([]string, error) { var ( newCommand []string ) @@ -79,6 +79,8 @@ func GenerateCommand(command, imageName, name string) ([]string, error) { newArg = fmt.Sprintf("NAME=%s", name) case "$NAME": newArg = name + case "$GLOBAL_OPTS": + newArg = globalOpts default: newArg = arg } -- cgit v1.2.3-54-g00ecf