summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-support/drbd
diff options
context:
space:
mode:
authorBian Naimeng <biannm@cn.fujitsu.com>2014-12-11 16:54:02 +0800
committerJoe MacDonald <joe_macdonald@mentor.com>2014-12-16 16:50:23 -0500
commit8dbcae94bf676794ffd67e8fc77bfe2f627a42f6 (patch)
treef4d6cece9eca5b5a21710467c419a830b18658b8 /meta-networking/recipes-support/drbd
parent10d3b5e33b11a38ddc2d388ecd1b9c51fac6f190 (diff)
downloadmeta-openembedded-8dbcae94bf676794ffd67e8fc77bfe2f627a42f6.tar.gz
drbd: Add recipes
DRBD is a block device which is designed to build high availability clusters. Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
Diffstat (limited to 'meta-networking/recipes-support/drbd')
-rw-r--r--meta-networking/recipes-support/drbd/drbd/drbd.service12
-rw-r--r--meta-networking/recipes-support/drbd/drbd_8.4.4.bb51
2 files changed, 63 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/drbd/drbd/drbd.service b/meta-networking/recipes-support/drbd/drbd/drbd.service
new file mode 100644
index 000000000..354399997
--- /dev/null
+++ b/meta-networking/recipes-support/drbd/drbd/drbd.service
@@ -0,0 +1,12 @@
1[Unit]
2Description=DRBD Service
3After=network.target
4
5[Service]
6Type=oneshot
7RemainAfterExit=yes
8ExecStart=@LIBEXECDIR@/drbd-helper start
9ExecStop=@LIBEXECDIR@/drbd-helper stop
10
11[Install]
12WantedBy=multi-user.target
diff --git a/meta-networking/recipes-support/drbd/drbd_8.4.4.bb b/meta-networking/recipes-support/drbd/drbd_8.4.4.bb
new file mode 100644
index 000000000..491f05a59
--- /dev/null
+++ b/meta-networking/recipes-support/drbd/drbd_8.4.4.bb
@@ -0,0 +1,51 @@
1SUMMARY = "Distributed block device driver for Linux"
2DESCRIPTION = "DRBD mirrors a block device over the network to another machine.\
3DRBD mirrors a block device over the network to another machine.\
4Think of it as networked raid 1. It is a building block for\
5setting up high availability (HA) clusters."
6HOMEPAGE = "http://www.drbd.org/"
7SECTION = "kernel/userland"
8LICENSE = "GPLv2+"
9LIC_FILES_CHKSUM = "file://COPYING;md5=5574c6965ae5f583e55880e397fbb018"
10
11SRC_URI = "http://oss.linbit.com/${BPN}/8.4/${BPN}-${PV}.tar.gz \
12 file://drbd.service \
13 "
14SRC_URI[md5sum] = "b51815343c1a9151e2936b3b97520388"
15SRC_URI[sha256sum] = "a056219c5c23b079c3354179f7a1b9f55d47e573a4cd3178f2ef4c15604288f0"
16
17SYSTEMD_SERVICE_${PN} = "drbd.service"
18SYSTEMD_AUTO_ENABLE = "disable"
19
20inherit autotools-brokensep systemd
21
22EXTRA_OECONF = "--with-utils \
23 --without-km \
24 --with-initdir=/etc/init.d \
25 --without-pacemaker \
26 --without-rgmanager \
27 --without-bashcompletion \
28 --with-distro debian \
29 "
30
31do_configure (){
32 oe_runconf
33}
34
35do_install_append() {
36 if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then
37 install -d ${D}/${systemd_unitdir}/system
38 install -m 644 ${WORKDIR}/drbd.service ${D}/${systemd_unitdir}/system
39 install -d ${D}/${libexecdir}
40 install -m 755 ${D}/${sysconfdir}/init.d/drbd ${D}/${libexecdir}/drbd-helper
41
42 sed -i -e 's,@LIBEXECDIR@,${libexecdir},g' \
43 ${D}${systemd_unitdir}/system/drbd.service
44 fi
45}
46
47RDEPENDS_${PN} += "bash perl"
48
49FILES_${PN} += "/run"
50FILES_${PN} += "${base_libdir}/drbd"
51FILES_${PN}-dbg += "${base_libdir}/drbd/.debug"