diff options
| author | Bruce Ashfield <bruce.ashfield@windriver.com> | 2015-04-08 13:26:22 -0400 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2015-04-08 13:27:19 -0400 |
| commit | 19ca5c408ad14bef81d3e785f0cb4a70e95db467 (patch) | |
| tree | 42efc1a356d69b97e16e5e069aae5421d3b74cbb /recipes-containers/docker/docker_git.bb | |
| parent | 29bca75fa656713e3ab64f6ff8d26a679f10a13c (diff) | |
| download | meta-virtualization-19ca5c408ad14bef81d3e785f0cb4a70e95db467.tar.gz | |
docker: add sysvinit script
Adding a basic sysvinit script to docker .. for those that still use
sysvinit!
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'recipes-containers/docker/docker_git.bb')
| -rw-r--r-- | recipes-containers/docker/docker_git.bb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/recipes-containers/docker/docker_git.bb b/recipes-containers/docker/docker_git.bb index 225745a5..a683840d 100644 --- a/recipes-containers/docker/docker_git.bb +++ b/recipes-containers/docker/docker_git.bb | |||
| @@ -22,6 +22,7 @@ SRCREV = "2243e32cbbf1c9809c262a7376d34ca43a7a36dc" | |||
| 22 | SRC_URI = "\ | 22 | SRC_URI = "\ |
| 23 | git://github.com/docker/docker.git \ | 23 | git://github.com/docker/docker.git \ |
| 24 | file://docker.service \ | 24 | file://docker.service \ |
| 25 | file://docker.init \ | ||
| 25 | file://hi.Dockerfile \ | 26 | file://hi.Dockerfile \ |
| 26 | " | 27 | " |
| 27 | 28 | ||
| @@ -97,11 +98,15 @@ do_compile() { | |||
| 97 | go install github.com/docker/libcontainer/nsinit/ | 98 | go install github.com/docker/libcontainer/nsinit/ |
| 98 | } | 99 | } |
| 99 | 100 | ||
| 100 | inherit systemd | 101 | inherit systemd update-rc.d |
| 101 | 102 | ||
| 102 | SYSTEMD_PACKAGES = "${@base_contains('DISTRO_FEATURES','systemd','${PN}','',d)}" | 103 | SYSTEMD_PACKAGES = "${@base_contains('DISTRO_FEATURES','systemd','${PN}','',d)}" |
| 103 | SYSTEMD_SERVICE_${PN} = "${@base_contains('DISTRO_FEATURES','systemd','docker.service','',d)}" | 104 | SYSTEMD_SERVICE_${PN} = "${@base_contains('DISTRO_FEATURES','systemd','docker.service','',d)}" |
| 104 | 105 | ||
| 106 | INITSCRIPT_PACKAGES += "${@base_contains('DISTRO_FEATURES','sysvinit','${PN}','',d)}" | ||
| 107 | INITSCRIPT_NAME_${PN} = "${@base_contains('DISTRO_FEATURES','sysvinit','docker.init','',d)}" | ||
| 108 | INITSCRIPT_PARAMS_${PN} = "${OS_DEFAULT_INITSCRIPT_PARAMS}" | ||
| 109 | |||
| 105 | do_install() { | 110 | do_install() { |
| 106 | mkdir -p ${D}/${bindir} | 111 | mkdir -p ${D}/${bindir} |
| 107 | cp ${S}/bundles/${DOCKER_VERSION}-dev/dynbinary/docker-${DOCKER_VERSION}-dev \ | 112 | cp ${S}/bundles/${DOCKER_VERSION}-dev/dynbinary/docker-${DOCKER_VERSION}-dev \ |
| @@ -114,6 +119,9 @@ do_install() { | |||
| 114 | install -m 644 ${S}/contrib/init/systemd/docker.* ${D}/${systemd_unitdir}/system | 119 | install -m 644 ${S}/contrib/init/systemd/docker.* ${D}/${systemd_unitdir}/system |
| 115 | # replaces one copied from above with one that uses the local registry for a mirror | 120 | # replaces one copied from above with one that uses the local registry for a mirror |
| 116 | install -m 644 ${WORKDIR}/docker.service ${D}/${systemd_unitdir}/system | 121 | install -m 644 ${WORKDIR}/docker.service ${D}/${systemd_unitdir}/system |
| 122 | else | ||
| 123 | install -d ${D}${sysconfdir}/init.d | ||
| 124 | install -m 0755 ${WORKDIR}/docker.init ${D}${sysconfdir}/init.d/docker.init | ||
| 117 | fi | 125 | fi |
| 118 | 126 | ||
| 119 | cp ${S}/vendor/bin/nsinit ${D}/${bindir} | 127 | cp ${S}/vendor/bin/nsinit ${D}/${bindir} |
