diff --git a/lxcconfig/lxcconfig.go b/lxcconfig/lxcconfig.go index 6b62b2a..1eee4c5 100644 --- a/lxcconfig/lxcconfig.go +++ b/lxcconfig/lxcconfig.go @@ -20,7 +20,7 @@ var ( template.New("lxcconfig").Parse("" + "lxc.include = LXC_TEMPLATE_CONFIG/common.conf\n" + "lxc.architecture = {{ .Architecture }}\n" + - "lxc.execute.cmd = '{{ .Cmd }}'\n" + + "lxc.init.cmd = '{{ .Cmd }}'\n" + "{{ if .Cwd }}lxc.init.cwd = {{ .Cwd }}\n{{ end }}" + "{{ range .Env }}lxc.environment = {{ . }}\n{{ end }}")) errBadManifest = errors.New("bad or missing manifest.json") diff --git a/lxcconfig/lxcconfig_test.go b/lxcconfig/lxcconfig_test.go index 798ba35..58ef33f 100644 --- a/lxcconfig/lxcconfig_test.go +++ b/lxcconfig/lxcconfig_test.go @@ -27,7 +27,7 @@ func TestLXCConfig(t *testing.T) { want: strings.Join([]string{ `lxc.include = LXC_TEMPLATE_CONFIG/common.conf`, `lxc.architecture = amd64`, - `lxc.execute.cmd = '/bin/sh'`, + `lxc.init.cmd = '/bin/sh'`, ``, }, "\n"), }, @@ -48,7 +48,7 @@ func TestLXCConfig(t *testing.T) { want: strings.Join([]string{ `lxc.include = LXC_TEMPLATE_CONFIG/common.conf`, `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.environment = LONGNAME="Foo Bar"`, `lxc.environment = SHELL=/bin/tcsh`,