mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-22 15:01:00 +02:00
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.
This commit is contained in:
parent
fb89db40ae
commit
81e717d84e
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user