mirror of
https://github.com/flatcar/scripts.git
synced 2025-12-15 22:31:59 +01:00
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:
parent
517455f35e
commit
f4f9107cae
@ -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)
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
coreos-oem-gce-0.0.1.ebuild
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user