Move all output to the directories it will be in eventually

Signed-off-by: Justin Cormack <justin@specialbusservice.com>
This commit is contained in:
Justin Cormack
2016-09-10 21:29:28 +01:00
committed by Justin Cormack
parent a225fb66b4
commit b1597ff9a9
26 changed files with 75 additions and 64 deletions

View File

@@ -0,0 +1,33 @@
#!/bin/sh
printf '\n'
DEV="$(find /dev -maxdepth 1 -type b ! -name 'loop*' | grep -v '[0-9]$' | sed 's@.*/dev/@@' | head -1 )"
[ $? -eq 0 ] && printf "✓ Drive found: $DEV\n" || printf "✗ No drive found\n"
DEV=$(mount | grep '/dev/.*da. on /var type')
[ $? -eq 0 ] && printf "✓ Drive mounted: $DEV\n" || printf "✗ No drive mounted\n"
INET=$(ifconfig eth0 2> /dev/null | grep 'inet addr')
[ $? -eq 0 ] && printf "✓ Network connected: $INET\n" || printf "✗ No network connection\n"
if [ "$(mobyplatform)" = "mac" ]
then
FUSE=$(ps -eo args | grep '^/sbin/transfused')
[ $? -eq 0 ] && printf "✓ Process transfused running\n" || printf "✗ No transfused process\n"
fi
if [ "$(mobyplatform)" = "windows" ]
then
TAPVS=$(ps -eo args | grep '^/sbin/tap-vsockd')
[ $? -eq 0 ] && printf "✓ Process tap-vsockd running\n" || printf "✗ No tap-vsockd process\n"
fi
DOCKER=$(ps -eo args | grep '^/usr/bin/dockerd')
[ $? -eq 0 ] && printf "✓ Process dockerd running: $DOCKER\n" || printf "✗ No dockerd process\n"
CONTAINERD=$(ps -eo args | grep '^docker-containerd')
[ $? -eq 0 ] && printf "✓ Process containerd running: $CONTAINERD\n" || printf "✗ No containerd process\n"
DOCKERPS=$(docker ps 2>&1)
[ $? -eq 0 ] && printf "✓ Docker daemon working\n" || printf "✗ Docker ps failed: $DOCKERPS\n"
DIAGNOSTICS=$(ps -eo args | grep '^/usr/bin/diagnostics-server')
[ $? -eq 0 ] && printf "✓ Diagnostics server running: $DIAGNOSTICS\n" || printf "✗ No diagnostics server\n"
CONTAINERD=$(ps -eo args | grep '^/usr/bin/containerd')
[ $? -eq 0 ] && printf "✓ System containerd server running: $CONTAINERD\n" || printf "✗ No containerd server\n"
CONTAINERPS=$(containerd-ctr containers 2>&1)
[ $? -eq 0 ] && printf "✓ System containerd working\n" || printf "✗ containerd failed: $CONTAINERPS\n"
exit 0