blob: b4c4ea6dd7553d82e0cce386a5e3a430e54df27b [file] [log] [blame]
#!/bin/bash
set -x
# Record the directory of this file.
REL=$(dirname "$0")
# Check argument count is valid.
if [ $# -ne 2 ]; then
exit 1
fi
HOSTNAME=$1;
MOUNT=$2
echo ${HOSTNAME} > ${MOUNT}/etc/hostname
install -D --mode=600 ${REL}/../../authorized_keys ${MOUNT}/root/.ssh/authorized_keys