app-emulation/google-compute-engine: use a config template

The configuration template needs to be written by the service
itself in the current setup.  The host's /etc is mounted into the
ACI to provide all of the user's system configuration and to allow
the GCE scripts to make their modifications, so the template can't
be included in the ACI.  It can't be written to the host's /etc
either, since it is read-only in the SDK when OEM packages are
being installed.
This commit is contained in:
David Michael 2016-10-18 16:09:22 -07:00
parent 517455f35e
commit f4f9107cae
3 changed files with 6 additions and 6 deletions

View File

@ -30,12 +30,6 @@ RDEPEND="
S="${WORKDIR}/compute-image-packages-${PV}"
src_prepare() {
# Don't attempt to mess with our host keys.
sed -i -e '/set_host_keys/s/true/false/i' \
"${S}"/google_compute_engine/instance_setup/instance_config.py
}
src_compile() {
(cd "${S}" && exec python setup.py build)
}

View File

@ -0,0 +1 @@
coreos-oem-gce-0.0.1.ebuild

View File

@ -7,6 +7,11 @@ set -e
cat << 'EOF' > init.sh && chmod 755 init.sh
#!/bin/bash -ex
# Write a configuration template if it does not exist.
[ -e /etc/default/instance_configs.cfg.template ] ||
echo -e > /etc/default/instance_configs.cfg.template \
'[InstanceSetup]\nset_host_keys = false'
# Run the initialization scripts.
/usr/bin/google_instance_setup
/usr/bin/google_network_setup