diff --git a/src/packerfile-gcp.mk b/src/packerfile-gcp.mk index 3ec5a60..de5742c 100644 --- a/src/packerfile-gcp.mk +++ b/src/packerfile-gcp.mk @@ -52,7 +52,7 @@ define OPACK_PACKER_CLOUD_CONTENT = }, { "type": "shell", - "inline": ["cp /root/.ssh/authorized_keys /home/opack/.ssh/authorized_keys; chown opack /home/opack/.ssh/authorized_keys"] + "inline": ["cp /root/.ssh/authorized_keys /home/$(OPACK_SYS_USER)/.ssh/authorized_keys; chown $(OPACK_SYS_USER) /home/$(OPACK_SYS_USER)/.ssh/authorized_keys"] } ], "post-processors": [ [ diff --git a/src/packerfile.mk b/src/packerfile.mk index 6d3ea46..9794f9c 100644 --- a/src/packerfile.mk +++ b/src/packerfile.mk @@ -48,7 +48,7 @@ define OPACK_PACKER_CONTENT = }, { "type": "shell", - "inline": ["cp /root/.ssh/authorized_keys /home/opack/.ssh/authorized_keys; chown opack /home/opack/.ssh/authorized_keys"] + "inline": ["cp /root/.ssh/authorized_keys /home/$(OPACK_SYS_USER)/.ssh/authorized_keys; chown $(OPACK_SYS_USER) /home/$(OPACK_SYS_USER)/.ssh/authorized_keys"] } ], "post-processors": [ [