diff options
| -rw-r--r-- | recipes-containers/docker/docker-ce_git.bb | 2 | ||||
| -rw-r--r-- | recipes-containers/docker/docker_git.bb | 2 | ||||
| -rw-r--r-- | recipes-containers/docker/files/docker.init | 12 |
3 files changed, 10 insertions, 6 deletions
diff --git a/recipes-containers/docker/docker-ce_git.bb b/recipes-containers/docker/docker-ce_git.bb index 7a418508..caf6d704 100644 --- a/recipes-containers/docker/docker-ce_git.bb +++ b/recipes-containers/docker/docker-ce_git.bb | |||
| @@ -62,7 +62,7 @@ DEPENDS = " \ | |||
| 62 | PACKAGES =+ "${PN}-contrib" | 62 | PACKAGES =+ "${PN}-contrib" |
| 63 | 63 | ||
| 64 | DEPENDS_append_class-target = " lvm2" | 64 | DEPENDS_append_class-target = " lvm2" |
| 65 | RDEPENDS_${PN} = "util-linux iptables \ | 65 | RDEPENDS_${PN} = "util-linux util-linux-unshare iptables \ |
| 66 | ${@bb.utils.contains('DISTRO_FEATURES', 'aufs', 'aufs-util', '', d)} \ | 66 | ${@bb.utils.contains('DISTRO_FEATURES', 'aufs', 'aufs-util', '', d)} \ |
| 67 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', 'cgroup-lite', d)} \ | 67 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', 'cgroup-lite', d)} \ |
| 68 | " | 68 | " |
diff --git a/recipes-containers/docker/docker_git.bb b/recipes-containers/docker/docker_git.bb index f63cee16..79578083 100644 --- a/recipes-containers/docker/docker_git.bb +++ b/recipes-containers/docker/docker_git.bb | |||
| @@ -67,7 +67,7 @@ PACKAGECONFIG[seccomp] = "seccomp,,libseccomp" | |||
| 67 | PACKAGES =+ "${PN}-contrib" | 67 | PACKAGES =+ "${PN}-contrib" |
| 68 | 68 | ||
| 69 | DEPENDS_append_class-target = " lvm2" | 69 | DEPENDS_append_class-target = " lvm2" |
| 70 | RDEPENDS_${PN} = "util-linux iptables \ | 70 | RDEPENDS_${PN} = "util-linux util-linux-unshare iptables \ |
| 71 | ${@bb.utils.contains('DISTRO_FEATURES', 'aufs', 'aufs-util', '', d)} \ | 71 | ${@bb.utils.contains('DISTRO_FEATURES', 'aufs', 'aufs-util', '', d)} \ |
| 72 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', 'cgroup-lite', d)} \ | 72 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', 'cgroup-lite', d)} \ |
| 73 | " | 73 | " |
diff --git a/recipes-containers/docker/files/docker.init b/recipes-containers/docker/files/docker.init index 2e8eb9e4..0aea8d01 100644 --- a/recipes-containers/docker/files/docker.init +++ b/recipes-containers/docker/files/docker.init | |||
| @@ -22,7 +22,7 @@ | |||
| 22 | # Source function library. | 22 | # Source function library. |
| 23 | . /etc/init.d/functions | 23 | . /etc/init.d/functions |
| 24 | 24 | ||
| 25 | prog="docker" | 25 | prog="dockerd" |
| 26 | unshare=/usr/bin/unshare | 26 | unshare=/usr/bin/unshare |
| 27 | exec="/usr/bin/$prog" | 27 | exec="/usr/bin/$prog" |
| 28 | pidfile="/var/run/$prog.pid" | 28 | pidfile="/var/run/$prog.pid" |
| @@ -40,7 +40,7 @@ start() { | |||
| 40 | if ! [ -f $pidfile ]; then | 40 | if ! [ -f $pidfile ]; then |
| 41 | printf "Starting $prog:\t" | 41 | printf "Starting $prog:\t" |
| 42 | echo -e "\n$(date)\n" >> $logfile | 42 | echo -e "\n$(date)\n" >> $logfile |
| 43 | "$unshare" -m -- $exec daemon $other_args &>> $logfile & | 43 | "$unshare" -m -- $exec $other_args &>> $logfile & |
| 44 | pid=$! | 44 | pid=$! |
| 45 | touch $lockfile | 45 | touch $lockfile |
| 46 | # wait up to 10 seconds for the pidfile to exist. see | 46 | # wait up to 10 seconds for the pidfile to exist. see |
| @@ -83,7 +83,7 @@ force_reload() { | |||
| 83 | } | 83 | } |
| 84 | 84 | ||
| 85 | rh_status() { | 85 | rh_status() { |
| 86 | status -p $pidfile $prog | 86 | status $prog |
| 87 | } | 87 | } |
| 88 | 88 | ||
| 89 | rh_status_q() { | 89 | rh_status_q() { |
| @@ -99,24 +99,28 @@ check_for_cleanup() { | |||
| 99 | 99 | ||
| 100 | case "$1" in | 100 | case "$1" in |
| 101 | start) | 101 | start) |
| 102 | rh_status_q && exit 0 | ||
| 102 | $1 | 103 | $1 |
| 103 | ;; | 104 | ;; |
| 104 | stop) | 105 | stop) |
| 106 | rh_status_q || exit 0 | ||
| 105 | $1 | 107 | $1 |
| 106 | ;; | 108 | ;; |
| 107 | restart) | 109 | restart) |
| 108 | $1 | 110 | $1 |
| 109 | ;; | 111 | ;; |
| 110 | reload) | 112 | reload) |
| 113 | rh_status_q || exit 7 | ||
| 111 | $1 | 114 | $1 |
| 112 | ;; | 115 | ;; |
| 113 | force-reload) | 116 | force-reload) |
| 114 | force_reload | 117 | force_reload |
| 115 | ;; | 118 | ;; |
| 116 | status) | 119 | status) |
| 117 | status | 120 | rh_status |
| 118 | ;; | 121 | ;; |
| 119 | condrestart|try-restart) | 122 | condrestart|try-restart) |
| 123 | rh_status_q || exit 0 | ||
| 120 | restart | 124 | restart |
| 121 | ;; | 125 | ;; |
| 122 | *) | 126 | *) |
