Start diagnostics server earlier, before Docker

Allows it to be used to see what the boot state is.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
Justin Cormack 2017-01-25 15:10:35 +00:00
parent 537ad4e34d
commit fa4f1aaedc
4 changed files with 31 additions and 24 deletions

View File

@ -43,6 +43,7 @@ RUN \
rc-update add transfused default && \
rc-update add automount sysinit && \
rc-update add diagnostics default && \
rc-update add diagnostics-server boot && \
rc-update add database-mac boot && \
rc-update add database-windows boot && \
rc-update add database-aws default && \

View File

@ -7,28 +7,5 @@ depend()
start()
{
ebegin "Checking system state"
DIAGNOSTICS_SERVER_FLAGS=""
case "$(mobyplatform)" in
"aws")
DIAGNOSTICS_SERVER_FLAGS="-http"
;;
"azure")
DIAGNOSTICS_SERVER_FLAGS="-http"
;;
"gcp")
DIAGNOSTICS_SERVER_FLAGS="-http"
;;
"windows")
DIAGNOSTICS_SERVER_FLAGS="-hvsock"
;;
"mac")
DIAGNOSTICS_SERVER_FLAGS="-vsock"
;;
esac
/usr/bin/diagnostics-server ${DIAGNOSTICS_SERVER_FLAGS} &
/usr/bin/diagnostics
}

View File

@ -0,0 +1,30 @@
#!/sbin/openrc-run
start()
{
ebegin "Starting diagnostics server"
DIAGNOSTICS_SERVER_FLAGS=""
case "$(mobyplatform)" in
"aws")
DIAGNOSTICS_SERVER_FLAGS="-http"
;;
"azure")
DIAGNOSTICS_SERVER_FLAGS="-http"
;;
"gcp")
DIAGNOSTICS_SERVER_FLAGS="-http"
;;
"windows")
DIAGNOSTICS_SERVER_FLAGS="-hvsock"
;;
"mac")
DIAGNOSTICS_SERVER_FLAGS="-vsock"
;;
esac
/usr/bin/diagnostics-server ${DIAGNOSTICS_SERVER_FLAGS} &
eend 0
}

View File

@ -13,7 +13,6 @@ ok()
printf "✓ $1"
}
printf '\n'
DEV="$(find /dev -maxdepth 1 -type b ! -name 'loop*' | grep -v '[0-9]$' | sed 's@.*/dev/@@' | head -1 )"
[ $? -eq 0 ] && ok "Drive found: $DEV\n" || fail "No drive found\n"
DEV=$(mount | grep '/dev/.* on /var type')