diff options
author | Jonathan Bauer | 2018-02-13 14:40:59 +0100 |
---|---|---|
committer | Jonathan Bauer | 2018-02-13 14:40:59 +0100 |
commit | a5172d418360bc96be639bad0b597d6e62bfc7fb (patch) | |
tree | 8d9de7e75fa3d17c8b856c5c57a8640104c538e8 /Makefile | |
parent | Makefile: clean_all target (diff) | |
download | packer-templates-a5172d418360bc96be639bad0b597d6e62bfc7fb.tar.gz packer-templates-a5172d418360bc96be639bad0b597d6e62bfc7fb.tar.xz packer-templates-a5172d418360bc96be639bad0b597d6e62bfc7fb.zip |
Makefile: quote ROOTPW variable when generating/validating its hash
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -73,7 +73,7 @@ endif HASHER := sha256sum check_rootpw = $(if $(strip $(ROOTPW)),\ $(if $1,\ - $(if $(shell echo $(ROOTPW) | $(HASHER) --check --quiet $1/base/rootpw.$(HASHER)),\ + $(if $(shell echo "$(ROOTPW)" | $(HASHER) --check --quiet $1/base/rootpw.$(HASHER)),\ $(error ROOTPW password hash does not match $1/base/rootpw.$(HASHER)),\ ),\ ),\ @@ -94,7 +94,7 @@ $(BASETARGETS): -var='vm_name=rootfs-image' \ -var='output_directory=$(@D)/base' \ $(@D).json - @echo $(ROOTPW) | $(HASHER) > $(@D)/base/rootpw.$(HASHER) + @echo "$(ROOTPW)" | $(HASHER) > $(@D)/base/rootpw.$(HASHER) # Provisioning images |