diff options
| -rw-r--r-- | meta-networking/recipes-support/drbd/drbd/drbd.service | 12 | ||||
| -rw-r--r-- | meta-networking/recipes-support/drbd/drbd_8.4.4.bb | 51 |
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 0000000000..3543999976 --- /dev/null +++ b/meta-networking/recipes-support/drbd/drbd/drbd.service | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | [Unit] | ||
| 2 | Description=DRBD Service | ||
| 3 | After=network.target | ||
| 4 | |||
| 5 | [Service] | ||
| 6 | Type=oneshot | ||
| 7 | RemainAfterExit=yes | ||
| 8 | ExecStart=@LIBEXECDIR@/drbd-helper start | ||
| 9 | ExecStop=@LIBEXECDIR@/drbd-helper stop | ||
| 10 | |||
| 11 | [Install] | ||
| 12 | WantedBy=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 0000000000..491f05a592 --- /dev/null +++ b/meta-networking/recipes-support/drbd/drbd_8.4.4.bb | |||
| @@ -0,0 +1,51 @@ | |||
| 1 | SUMMARY = "Distributed block device driver for Linux" | ||
| 2 | DESCRIPTION = "DRBD mirrors a block device over the network to another machine.\ | ||
| 3 | DRBD mirrors a block device over the network to another machine.\ | ||
| 4 | Think of it as networked raid 1. It is a building block for\ | ||
| 5 | setting up high availability (HA) clusters." | ||
| 6 | HOMEPAGE = "http://www.drbd.org/" | ||
| 7 | SECTION = "kernel/userland" | ||
| 8 | LICENSE = "GPLv2+" | ||
| 9 | LIC_FILES_CHKSUM = "file://COPYING;md5=5574c6965ae5f583e55880e397fbb018" | ||
| 10 | |||
| 11 | SRC_URI = "http://oss.linbit.com/${BPN}/8.4/${BPN}-${PV}.tar.gz \ | ||
| 12 | file://drbd.service \ | ||
| 13 | " | ||
| 14 | SRC_URI[md5sum] = "b51815343c1a9151e2936b3b97520388" | ||
| 15 | SRC_URI[sha256sum] = "a056219c5c23b079c3354179f7a1b9f55d47e573a4cd3178f2ef4c15604288f0" | ||
| 16 | |||
| 17 | SYSTEMD_SERVICE_${PN} = "drbd.service" | ||
| 18 | SYSTEMD_AUTO_ENABLE = "disable" | ||
| 19 | |||
| 20 | inherit autotools-brokensep systemd | ||
| 21 | |||
| 22 | EXTRA_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 | |||
| 31 | do_configure (){ | ||
| 32 | oe_runconf | ||
| 33 | } | ||
| 34 | |||
| 35 | do_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 | |||
| 47 | RDEPENDS_${PN} += "bash perl" | ||
| 48 | |||
| 49 | FILES_${PN} += "/run" | ||
| 50 | FILES_${PN} += "${base_libdir}/drbd" | ||
| 51 | FILES_${PN}-dbg += "${base_libdir}/drbd/.debug" | ||
