diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vagrant/files/run.sh b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vagrant/files/run.sh new file mode 100644 index 0000000000..981e0e8849 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vagrant/files/run.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +set -e + +USER_DIR="/home/core" + +if [ -e "${USER_DIR}/.ssh/authorized_keys" ]; then + exit 0 +fi + +if [ ! -d "${USER_DIR}/.ssh" ]; then + mkdir -p ${USER_DIR}/.ssh + chmod 700 ${USER_DIR}/.ssh +fi + +cp /usr/share/oem/vagrant.pub "${USER_DIR}/.ssh/authorized_keys" +chown -R core: "${USER_DIR}/.ssh" diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vagrant/files/vagrant.pub b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vagrant/files/vagrant.pub new file mode 100644 index 0000000000..18a9c00fd5 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vagrant/files/vagrant.pub @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ== vagrant insecure public key diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vagrant/oem-vagrant-0.0.1.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vagrant/oem-vagrant-0.0.1.ebuild new file mode 100644 index 0000000000..736b540adf --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-vagrant/oem-vagrant-0.0.1.ebuild @@ -0,0 +1,21 @@ +# Copyright 2013 The CoreOS Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +DESCRIPTION="OEM suite for vagrant images" +HOMEPAGE="" +SRC_URI="" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="amd64" +IUSE="" + +src_install() { + insinto "/" + doins "${FILESDIR}/vagrant.pub" + + exeinto "/" + doexe ${FILESDIR}/run.sh +}