mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-23 19:05:37 +00:00
Merge pull request #182 from dsheets/transfused-service-start-mounts
transfused service delay start until mounts are ready
This commit is contained in:
commit
99dfa4e4c1
@ -8,18 +8,8 @@ start()
|
||||
|
||||
mkdir -p /Mac
|
||||
|
||||
if cat /proc/cmdline | grep -q 'com.docker.driverDir'
|
||||
then
|
||||
DRIVERDIR="/Mac$(cat /proc/cmdline | sed -e 's/.*com.docker.driverDir="//' -e 's/".*//')"
|
||||
RUNTIME_LOGFILE=${DRIVERDIR}/log/transfused.log
|
||||
else
|
||||
ID=$(LC_CTYPE=C tr -dc A-Za-z0-9 < /dev/urandom | head -c 8)
|
||||
RUNTIME_LOGFILE="/Mac/private/tmp/transfused_${ID}.log"
|
||||
fi
|
||||
|
||||
PIDFILE=/var/run/transfused.pid
|
||||
STARTUP_LOGFILE=/var/transfused_start.log
|
||||
MOUNT_TRIGGER=/Mac
|
||||
|
||||
start-stop-daemon --start --quiet \
|
||||
--background \
|
||||
@ -29,6 +19,8 @@ start()
|
||||
-p "${PIDFILE}" \
|
||||
-l "${STARTUP_LOGFILE}"
|
||||
|
||||
ewaitfile 2 ${PIDFILE}
|
||||
|
||||
eend $? "Failed to start transfused"
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user