File tree Expand file tree Collapse file tree 10 files changed +10
-97
lines changed
sdk_container/src/third_party/coreos-overlay
coreos-devel/board-packages Expand file tree Collapse file tree 10 files changed +10
-97
lines changed Original file line number Diff line number Diff line change @@ -257,7 +257,6 @@ IMG_iso_MEM=2048
257
257
IMG_gce_DISK_LAYOUT=vm
258
258
IMG_gce_CONF_FORMAT=gce
259
259
IMG_gce_OEM_PACKAGE=common-oem-files
260
- IMG_gce_OEM_ACI=gce
261
260
IMG_gce_OEM_USE=gce
262
261
IMG_gce_OEM_SYSEXT=oem-gce
263
262
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
- #! /bin/sh
2
- set -e
3
-
1
+ #! /bin/bash -ex
4
2
# GCE can work with our normal file system, but it needs an "init system".
5
3
# Here is a better place to install this script so it doesn't get put in real
6
4
# images built from the GCE Python package.
7
- cat << 'EOF ' > init.sh && chmod 755 init.sh
8
- #!/bin/bash -ex
9
5
10
6
# Write a configuration template if it does not exist.
11
7
[ -e /etc/default/instance_configs.cfg.template ] ||
@@ -38,20 +34,3 @@ test -n "$stopping" || exit 1
38
34
39
35
# Otherwise, run the shutdown script before quitting.
40
36
exec /usr/bin/google_metadata_script_runner --script-type shutdown
41
- EOF
42
-
43
- # Disable PAM checks in the container.
44
- rm -f usr/lib/pam.d/*
45
- cat << 'EOF ' > usr/lib/pam.d/other
46
- account optional pam_permit.so
47
- auth optional pam_permit.so
48
- password optional pam_permit.so
49
- session optional pam_permit.so
50
- EOF
51
-
52
- # Don't bundle these paths, since they are useless to us.
53
- mv usr/lib/systemd/lib* .so* usr/lib64/
54
- rm -fr boot etc/* usr/lib/systemd var/db/pkg
55
-
56
- # Remove test stuff from python - it's quite large.
57
- rm -rf usr/lib/python* /test
Original file line number Diff line number Diff line change 1
1
[Unit]
2
- Upholds=oem-gce-enable-oslogin.service setup-oem.service
2
+ Upholds=oem-gce-enable-oslogin.service setup-oem.service oem-gce.service
Original file line number Diff line number Diff line change @@ -12,20 +12,7 @@ RestartSec=5
12
12
KillMode =process
13
13
KillSignal =SIGTERM
14
14
15
- ExecStartPre =/usr/bin/rm -f /var/lib/flatcar-oem-gce.img
16
- ExecStartPre =/usr/bin/truncate -s 1G /var/lib/flatcar-oem-gce.img
17
- ExecStartPre =/usr/sbin/mkfs.ext4 /var/lib/flatcar-oem-gce.img
18
- ExecStartPre =/usr/bin/rm -rf /var/lib/flatcar-oem-gce
19
- ExecStartPre =/usr/bin/mkdir -p /var/lib/flatcar-oem-gce
20
- ExecStartPre =-/usr/bin/umount /var/lib/flatcar-oem-gce.img
21
- ExecStartPre =/usr/bin/mount /var/lib/flatcar-oem-gce.img /var/lib/flatcar-oem-gce
22
- ExecStartPre =/usr/bin/tar --directory =/var/lib/flatcar-oem-gce --extract --file =/oem/flatcar-oem-gce.aci --strip-components =1 rootfs
23
- ExecStartPre =/usr/bin/umount /var/lib/flatcar-oem-gce.img
24
- # the container expects to be able to optmize irq settings in /proc/irq and /sys/
25
- Environment =SYSTEMD_NSPAWN_API_VFS_WRITABLE =1
26
- ExecStart =/usr/bin/systemd-nspawn --keep-unit --register =no --link-journal =no \
27
- --machine =oem-gce --capability =CAP_NET_ADMIN --bind =/dev/log --bind =/run/systemd --tmpfs =/run/lock --bind =/etc --bind =/home --bind-ro =/usr/share/google-oslogin/nsswitch.conf \
28
- --read-only --volatile =overlay --image =/var/lib/flatcar-oem-gce.img --kill-signal =SIGTERM /init.sh
15
+ ExecStart =/usr/bin/init.sh
29
16
30
17
[Install]
31
18
WantedBy =multi-user.target
Original file line number Diff line number Diff line change @@ -19,14 +19,20 @@ IUSE=""
19
19
# no source directory
20
20
S=" ${WORKDIR} "
21
21
22
+ RDEPEND="
23
+ app-emulation/google-compute-engine
24
+ "
25
+
22
26
OEM_NAME=" Google Compute Engine"
23
27
24
28
src_install () {
29
+ systemd_dounit " ${FILESDIR} /units/oem-gce.service"
25
30
systemd_dounit " ${FILESDIR} /units/oem-gce-enable-oslogin.service"
26
31
systemd_dounit " ${FILESDIR} /units/setup-oem.service"
27
32
systemd_install_dropin " multi-user.target" " ${FILESDIR} /units/10-oem-gce.conf"
28
33
29
34
dobin " ${FILESDIR} /bin/enable-oslogin"
35
+ dobin " ${FILESDIR} /bin/init.sh"
30
36
31
37
# These files will be symlinked to /etc via 'setup-oem.service'
32
38
insinto /usr/share/gce/
Original file line number Diff line number Diff line change @@ -20,8 +20,8 @@ IUSE=""
20
20
DEPEND=" "
21
21
RDEPEND="
22
22
amd64? (
23
+ app-emulation/google-compute-engine
23
24
app-emulation/open-vm-tools
24
- coreos-base/coreos-oem-gce
25
25
coreos-base/nova-agent-container
26
26
coreos-base/nova-agent-watcher
27
27
)
You can’t perform that action at this time.
0 commit comments