Set SSH key in cobbler setup

SSHKEY is originally set in setup-host.sh, so this allows
setup-cobbler.sh to run independently of that script.

Change-Id: I4793e6a5db7359bec0eaa7b6a66efa7d58084126
This commit is contained in:
Melissa Kam 2017-01-23 16:14:22 -06:00
parent 25a865588f
commit 6c45b23c4a

View File

@ -74,6 +74,9 @@ DEVICE_NAME="${DEVICE_NAME:-vda}"
# This is set to instruct the preseed what the default network is expected to be
DEFAULT_NETWORK="${DEFAULT_NETWORK:-eth0}"
# Set SSH key to root user's public key
SSHKEY="${SSHKEY:-$(cat /root/.ssh/id_rsa.pub)}"
# Template the seed files
for seed_file in $(ls -1 templates/pre-seeds); do
cp -v "templates/pre-seeds/${seed_file}" "/var/lib/cobbler/kickstarts/${seed_file#*'/'}"