mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-27 04:28:20 +00:00
Merge pull request #271 from rneugeba/init-fix
Fix transfused and docker init scripts
This commit is contained in:
commit
df613f1f3f
@ -10,8 +10,11 @@ DEV=$(mount | grep '/dev/[sxv]da. on /var type')
|
|||||||
[ $? -eq 0 ] && printf "✓ Drive mounted: $DEV\n" || printf "✗ No drive mounted\n"
|
[ $? -eq 0 ] && printf "✓ Drive mounted: $DEV\n" || printf "✗ No drive mounted\n"
|
||||||
INET=$(ifconfig eth0 2> /dev/null | grep 'inet addr')
|
INET=$(ifconfig eth0 2> /dev/null | grep 'inet addr')
|
||||||
[ $? -eq 0 ] && printf "✓ Network connected: $INET\n" || printf "✗ No network connection\n"
|
[ $? -eq 0 ] && printf "✓ Network connected: $INET\n" || printf "✗ No network connection\n"
|
||||||
|
if [ ! -d /sys/bus/vmbus ]
|
||||||
|
then
|
||||||
FUSE=$(ps -eo args | grep '^/sbin/transfused')
|
FUSE=$(ps -eo args | grep '^/sbin/transfused')
|
||||||
[ $? -eq 0 ] && printf "✓ Process transfused running\n" || printf "✗ No transfused process\n"
|
[ $? -eq 0 ] && printf "✓ Process transfused running\n" || printf "✗ No transfused process\n"
|
||||||
|
fi
|
||||||
if [ -d /sys/bus/vmbus ]
|
if [ -d /sys/bus/vmbus ]
|
||||||
then
|
then
|
||||||
TAPVS=$(ps -eo args | grep '^/sbin/tap-vsockd')
|
TAPVS=$(ps -eo args | grep '^/sbin/tap-vsockd')
|
||||||
|
@ -13,9 +13,13 @@ start()
|
|||||||
|
|
||||||
pidfile="/run/docker.pid"
|
pidfile="/run/docker.pid"
|
||||||
|
|
||||||
# Start with networking on both Mac and Hyper-V, but in
|
# Only start with networking on cloud editions
|
||||||
# future change this to use a hypervisor socket.
|
DOCKER_OPTS="${DOCKER_OPTS} -H unix:///var/run/docker.sock"
|
||||||
DOCKER_OPTS="${DOCKER_OPTS} -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock"
|
if [ ! -z $(bootflag cloud_provider) ]
|
||||||
|
then
|
||||||
|
# TODO: More elegant way to turn on "debug mode"
|
||||||
|
DOCKER_OPTS="${DOCKER_OPTS} -H 0.0.0.0:2375"
|
||||||
|
fi
|
||||||
|
|
||||||
# some config is always in /etc/docker cannot specify alternative eg certs
|
# some config is always in /etc/docker cannot specify alternative eg certs
|
||||||
if mobyconfig exists etc/docker
|
if mobyconfig exists etc/docker
|
||||||
|
@ -4,6 +4,7 @@ description="fuse proxy server"
|
|||||||
|
|
||||||
start()
|
start()
|
||||||
{
|
{
|
||||||
|
[ -d /sys/bus/vmbus ] && exit 0
|
||||||
ebegin "Starting FUSE socket passthrough"
|
ebegin "Starting FUSE socket passthrough"
|
||||||
|
|
||||||
mkdir -p /host_docker_app
|
mkdir -p /host_docker_app
|
||||||
@ -27,6 +28,7 @@ start()
|
|||||||
|
|
||||||
stop()
|
stop()
|
||||||
{
|
{
|
||||||
|
[ -d /sys/bus/vmbus ] && exit 0
|
||||||
ebegin "Stopping FUSE socket passthrough"
|
ebegin "Stopping FUSE socket passthrough"
|
||||||
|
|
||||||
PIDFILE=/var/run/transfused.pid
|
PIDFILE=/var/run/transfused.pid
|
||||||
|
Loading…
Reference in New Issue
Block a user