Skip to content

Commit

Permalink
Makefile: do not overwrite TLS certificates
Browse files Browse the repository at this point in the history
Closes #368
  • Loading branch information
razvancrainea committed Oct 30, 2014
1 parent 01bce3f commit 465acb6
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions Makefile
Expand Up @@ -46,6 +46,10 @@ skip_cfg_install?=
#extra modules to exclude
skip_modules?=

# whether or not to overwrite TLS certificates
tls_overwrite_certs?=


makefile_defs=0
DEFS:=
TLS?=
Expand Down Expand Up @@ -576,11 +580,14 @@ install-cfg: $(cfg-prefix)/$(cfg-dir)
mkdir -p $(cfg-prefix)/$(cfg-dir)/tls/rootCA/private ; \
mkdir -p $(cfg-prefix)/$(cfg-dir)/tls/user ; \
for FILE in $(tls_configs) ; do \
if [ -f etc/$$FILE ] ; then \
$(INSTALL_TOUCH) etc/$$FILE \
$(cfg-prefix)/$(cfg-dir)/$$FILE ; \
$(INSTALL_CFG) etc/$$FILE \
$(cfg-prefix)/$(cfg-dir)/$$FILE ; \
if [ -f etc/$$FILE ]; then \
if [ "$(tls_overwrite_certs)" != "" -o \
! -f $(cfg-prefix)/$(cfg-dir)/$$FILE] ; then \
$(INSTALL_TOUCH) etc/$$FILE \
$(cfg-prefix)/$(cfg-dir)/$$FILE ; \
$(INSTALL_CFG) etc/$$FILE \
$(cfg-prefix)/$(cfg-dir)/$$FILE ; \
fi; \
fi ;\
done ; \
fi
Expand Down

0 comments on commit 465acb6

Please sign in to comment.