summaryrefslogtreecommitdiffstats
path: root/recipes-containers/docker/files/docker.init
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2017-07-16 16:48:22 +0200
committerBruce Ashfield <bruce.ashfield@windriver.com>2017-07-17 15:48:43 -0400
commitde50b560876d1bb3fdc0a4e87b09a1790745e0a2 (patch)
tree03baa7b335d89a250becdfc752a3a3f112e520e1 /recipes-containers/docker/files/docker.init
parentbe934f72d2758b6a71438633392dd14352db39f8 (diff)
downloadmeta-virtualization-de50b560876d1bb3fdc0a4e87b09a1790745e0a2.tar.gz
docker: Fix and update sysvinit script
Fix daemonization, align args with docker.service, fix line breaks in log file - and fix INITSCRIPT_PARAMS (there is no variable OS_DEFAULT_INITSCRIPT_PARAMS). Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'recipes-containers/docker/files/docker.init')
-rw-r--r--recipes-containers/docker/files/docker.init5
1 files changed, 3 insertions, 2 deletions
diff --git a/recipes-containers/docker/files/docker.init b/recipes-containers/docker/files/docker.init
index 9c01c758..2e8eb9e4 100644
--- a/recipes-containers/docker/files/docker.init
+++ b/recipes-containers/docker/files/docker.init
@@ -28,6 +28,7 @@ exec="/usr/bin/$prog"
28pidfile="/var/run/$prog.pid" 28pidfile="/var/run/$prog.pid"
29lockfile="/var/lock/subsys/$prog" 29lockfile="/var/lock/subsys/$prog"
30logfile="/var/log/$prog" 30logfile="/var/log/$prog"
31other_args="--registry-mirror=http://localhost:5000 --insecure-registry=http://localhost:5000 --raw-logs"
31 32
32[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog 33[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
33 34
@@ -38,8 +39,8 @@ start() {
38 39
39 if ! [ -f $pidfile ]; then 40 if ! [ -f $pidfile ]; then
40 printf "Starting $prog:\t" 41 printf "Starting $prog:\t"
41 echo "\n$(date)\n" >> $logfile 42 echo -e "\n$(date)\n" >> $logfile
42 "$unshare" -m -- $exec -d $other_args &>> $logfile & 43 "$unshare" -m -- $exec daemon $other_args &>> $logfile &
43 pid=$! 44 pid=$!
44 touch $lockfile 45 touch $lockfile
45 # wait up to 10 seconds for the pidfile to exist. see 46 # wait up to 10 seconds for the pidfile to exist. see