system → onboot daemon → services

As suggested by @shykes these are clearer

- onboot for things that are run at boot time to completion
- services for persistent services

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
Justin Cormack
2017-04-08 16:56:47 +01:00
parent 5956f7203a
commit eb22d6909f
18 changed files with 57 additions and 59 deletions

View File

@@ -1,15 +1,10 @@
#!/bin/sh
# TODO more robust
# while [ ! -S /run/containerd/containerd.sock ]; do sleep 1; done
# while ! ctr list 2> /dev/null; do sleep 1; done
# start onboot containers, run to completion
# start system containers
# temporarily using runc not containerd
if [ -d /containers/system ]
if [ -d /containers/onboot ]
then
for f in $(find /containers/system -mindepth 1 -maxdepth 1 | sort)
for f in $(find /containers/onboot -mindepth 1 -maxdepth 1 | sort)
do
base="$(basename $f)"
/usr/bin/runc run --bundle "$f" "$(basename $f)"
@@ -17,9 +12,12 @@ then
done
fi
if [ -d /containers/daemon ]
# start service containers
# temporarily using runc not containerd
if [ -d /containers/services ]
then
for f in $(find /containers/daemon -mindepth 1 -maxdepth 1 | sort)
for f in $(find /containers/services -mindepth 1 -maxdepth 1 | sort)
do
base="$(basename $f)"
log="/var/log/$base.log"