mkimage-profiles/features.in/net-ssh/generate.mk
Michael Shigorin de94641c41 vm-ssh: renamed to net-ssh and cleaned up
There was no need to split carrying over the pubkey
and tightening up permissions on the file and its parent
directory to be done in two separate scripts; this should
be more generic now as a bonus.

Users adjusted accordingly.
2013-08-12 20:53:01 +04:00

14 lines
307 B
Makefile

ifdef BUILDDIR
include $(BUILDDIR)/distcfg.mk
# prepare the provided public SSH key to be carried over into the image
all: SSH_DIR = $(BUILDDIR)/files/root/.ssh
all:
@if [ -s "$(SSH_KEY)" ]; then \
mkdir -pm0700 "$(SSH_DIR)"; \
install -pm0600 "$(SSH_KEY)" "$(SSH_DIR)/authorized_keys"; \
fi
endif