lxc.execute.cmd was meant to be lxc.init.cmd

main
Motiejus Jakštys 2021-05-24 00:11:58 +03:00
parent 64b5eaa954
commit dab7485e5b
2 changed files with 3 additions and 3 deletions

View File

@ -20,7 +20,7 @@ var (
template.New("lxcconfig").Parse("" + template.New("lxcconfig").Parse("" +
"lxc.include = LXC_TEMPLATE_CONFIG/common.conf\n" + "lxc.include = LXC_TEMPLATE_CONFIG/common.conf\n" +
"lxc.architecture = {{ .Architecture }}\n" + "lxc.architecture = {{ .Architecture }}\n" +
"lxc.execute.cmd = '{{ .Cmd }}'\n" + "lxc.init.cmd = '{{ .Cmd }}'\n" +
"{{ if .Cwd }}lxc.init.cwd = {{ .Cwd }}\n{{ end }}" + "{{ if .Cwd }}lxc.init.cwd = {{ .Cwd }}\n{{ end }}" +
"{{ range .Env }}lxc.environment = {{ . }}\n{{ end }}")) "{{ range .Env }}lxc.environment = {{ . }}\n{{ end }}"))
errBadManifest = errors.New("bad or missing manifest.json") errBadManifest = errors.New("bad or missing manifest.json")

View File

@ -27,7 +27,7 @@ func TestLXCConfig(t *testing.T) {
want: strings.Join([]string{ want: strings.Join([]string{
`lxc.include = LXC_TEMPLATE_CONFIG/common.conf`, `lxc.include = LXC_TEMPLATE_CONFIG/common.conf`,
`lxc.architecture = amd64`, `lxc.architecture = amd64`,
`lxc.execute.cmd = '/bin/sh'`, `lxc.init.cmd = '/bin/sh'`,
``, ``,
}, "\n"), }, "\n"),
}, },
@ -48,7 +48,7 @@ func TestLXCConfig(t *testing.T) {
want: strings.Join([]string{ want: strings.Join([]string{
`lxc.include = LXC_TEMPLATE_CONFIG/common.conf`, `lxc.include = LXC_TEMPLATE_CONFIG/common.conf`,
`lxc.architecture = amd64`, `lxc.architecture = amd64`,
`lxc.execute.cmd = '/entrypoint.sh /bin/sh -c "echo foo"'`, `lxc.init.cmd = '/entrypoint.sh /bin/sh -c "echo foo"'`,
`lxc.init.cwd = /x`, `lxc.init.cwd = /x`,
`lxc.environment = LONGNAME="Foo Bar"`, `lxc.environment = LONGNAME="Foo Bar"`,
`lxc.environment = SHELL=/bin/tcsh`, `lxc.environment = SHELL=/bin/tcsh`,