mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Revert "contrib/init: unshare mount namespace for inits"
This reverts commit b6569b6b82
.
Signed-off-by: David Calavera <david.calavera@gmail.com>
This commit is contained in:
parent
421b9b6859
commit
d8592eaff8
3 changed files with 6 additions and 9 deletions
|
@ -7,7 +7,6 @@ DOCKER_LOGFILE=${DOCKER_LOGFILE:-/var/log/${SVCNAME}.log}
|
|||
DOCKER_PIDFILE=${DOCKER_PIDFILE:-/run/${SVCNAME}.pid}
|
||||
DOCKER_BINARY=${DOCKER_BINARY:-/usr/bin/docker}
|
||||
DOCKER_OPTS=${DOCKER_OPTS:-}
|
||||
UNSHARE_BINARY=${UNSHARE_BINARY:-/usr/bin/unshare}
|
||||
|
||||
start() {
|
||||
checkpath -f -m 0644 -o root:docker "$DOCKER_LOGFILE"
|
||||
|
@ -17,12 +16,11 @@ start() {
|
|||
|
||||
ebegin "Starting docker daemon"
|
||||
start-stop-daemon --start --background \
|
||||
--exec "$UNSHARE_BINARY" \
|
||||
--exec "$DOCKER_BINARY" \
|
||||
--pidfile "$DOCKER_PIDFILE" \
|
||||
--stdout "$DOCKER_LOGFILE" \
|
||||
--stderr "$DOCKER_LOGFILE" \
|
||||
-- --mount \
|
||||
-- "$DOCKER_BINARY" -d -p "$DOCKER_PIDFILE" \
|
||||
-- -d -p "$DOCKER_PIDFILE" \
|
||||
$DOCKER_OPTS
|
||||
eend $?
|
||||
}
|
||||
|
|
|
@ -30,7 +30,6 @@ DOCKER_SSD_PIDFILE=/var/run/$BASE-ssd.pid
|
|||
DOCKER_LOGFILE=/var/log/$BASE.log
|
||||
DOCKER_OPTS=
|
||||
DOCKER_DESC="Docker"
|
||||
UNSHARE=${UNSHARE:-/usr/bin/unshare}
|
||||
|
||||
# Get lsb functions
|
||||
. /lib/lsb/init-functions
|
||||
|
@ -104,11 +103,11 @@ case "$1" in
|
|||
log_begin_msg "Starting $DOCKER_DESC: $BASE"
|
||||
start-stop-daemon --start --background \
|
||||
--no-close \
|
||||
--exec "$UNSHARE" \
|
||||
--exec "$DOCKER" \
|
||||
--pidfile "$DOCKER_SSD_PIDFILE" \
|
||||
--make-pidfile \
|
||||
-- --mount \
|
||||
-- "$DOCKER" -d -p "$DOCKER_PIDFILE" \
|
||||
-- \
|
||||
-d -p "$DOCKER_PIDFILE" \
|
||||
$DOCKER_OPTS \
|
||||
>> "$DOCKER_LOGFILE" 2>&1
|
||||
log_end_msg $?
|
||||
|
|
|
@ -39,7 +39,7 @@ script
|
|||
if [ -f /etc/default/$UPSTART_JOB ]; then
|
||||
. /etc/default/$UPSTART_JOB
|
||||
fi
|
||||
exec unshare -m -- "$DOCKER" -d $DOCKER_OPTS
|
||||
exec "$DOCKER" -d $DOCKER_OPTS
|
||||
end script
|
||||
|
||||
# Don't emit "started" event until docker.sock is ready.
|
||||
|
|
Loading…
Reference in a new issue