From 81e717d84e5d8f9eda6b034fa2a8fd09d7f2fcda Mon Sep 17 00:00:00 2001 From: David Michael Date: Thu, 20 Apr 2017 13:12:15 -0700 Subject: [PATCH] coreos-base/coreos-oem-gce: notify when all daemons are running Since /run/systemd is mounted from the host, the notify socket will update the host's agent service. Also, since systemd-notify is run by the "init" shell script, it uses the correct MainPID by default. --- ...oem-gce-0.0.1-r2.ebuild => coreos-oem-gce-0.0.1-r3.ebuild} | 0 .../coreos-base/coreos-oem-gce/files/manglefs.sh | 4 ++++ 2 files changed, 4 insertions(+) rename sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-oem-gce/{coreos-oem-gce-0.0.1-r2.ebuild => coreos-oem-gce-0.0.1-r3.ebuild} (100%) diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-oem-gce/coreos-oem-gce-0.0.1-r2.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-oem-gce/coreos-oem-gce-0.0.1-r3.ebuild similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-oem-gce/coreos-oem-gce-0.0.1-r2.ebuild rename to sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-oem-gce/coreos-oem-gce-0.0.1-r3.ebuild diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-oem-gce/files/manglefs.sh b/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-oem-gce/files/manglefs.sh index 013b990370..159dc122ab 100644 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-oem-gce/files/manglefs.sh +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-oem-gce/files/manglefs.sh @@ -27,6 +27,9 @@ do /usr/bin/google_${d}_daemon & daemon_pids+=($!) done +# Notify the host that everything is running. +NOTIFY_SOCKET=/run/systemd/notify /usr/bin/systemd-notify --ready + # Pause while the daemons are running, and stop them all when one dies. wait -n "${daemon_pids[@]}" || : kill "${daemon_pids[@]}" || : @@ -48,4 +51,5 @@ session optional pam_permit.so EOF # Don't bundle these paths, since they are useless to us. +mv usr/lib64/systemd/lib*.so* usr/lib64/ rm -fr boot etc/* usr/lib64/systemd var/db/pkg