2 ## Copyright (C) 2019 Wind River Systems, Inc.
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
16 FILESEXTRAPATHS_append := ":${THISDIR}/${PN}:"
20 file://0001-skip_wait_con_int_on_simplex.patch \
21 file://0002-drbd-conditional-crm-dependency.patch \
22 file://0003-drbd_report_condition.patch \
23 file://0004-drbdadm-ipaddr-change.patch \
24 file://0005-drbd_reconnect_standby_standalone.patch \
25 file://0006-avoid-kernel-userspace-version-check.patch \
26 file://0007-Update-OCF-to-attempt-connect-in-certain-states.patch \
27 file://0008-Increase-short-cmd-timeout-to-15-secs.patch \
28 file://0009-Check-for-mounted-device-before-demoting-Primary-DRB.patch \
29 file://0010-Include-sysmacros-for-major-minor-macros.patch \
30 file://0011-Disable-documentation.patch \
36 --with-initdir=/etc/init.d \
40 --with-bashcompletion \
43 --with-distro debian \
49 ${base_sbindir}/drbdsetup \
50 ${base_sbindir}/drbdadm \
51 ${base_sbindir}/drbdmeta \
52 ${nonarch_base_libdir}/drbd/drbdsetup-83 \
53 ${nonarch_base_libdir}/drbd/drbdadm-83 \
54 ${sysconfdir}/init.d/drbd \
55 ${sysconfdir}/drbd.conf \
57 ${sysconfdir}/drbd.d \
58 ${sbindir}/drbd-overview \
59 ${libdir}/drbd/outdate-peer.sh \
60 ${libdir}/drbd/snapshot-resync-target-lvm.sh \
61 ${libdir}/drbd/unsnapshot-resync-target-lvm.sh \
62 ${libdir}/drbd/notify-out-of-sync.sh \
63 ${libdir}/drbd/notify-split-brain.sh \
64 ${libdir}/drbd/notify-emergency-reboot.sh \
65 ${libdir}/drbd/notify-emergency-shutdown.sh \
66 ${libdir}/drbd/notify-io-error.sh \
67 ${libdir}/drbd/notify-pri-lost-after-sb.sh \
68 ${libdir}/drbd/notify-pri-lost.sh \
69 ${libdir}/drbd/notify-pri-on-incon-degr.sh \
70 ${libdir}/drbd/notify.sh \
71 ${libdir}/drbd/rhcs_fence \
72 ${sysconfdir}/udev/rules.d/65-drbd.rules \
73 ${libdir}/drbd/crm-fence-peer.sh \
74 ${libdir}/drbd/crm-unfence-peer.sh \
75 ${libdir}/drbd/stonith_admin-fence-peer.sh \
76 ${libdir}/ocf/resource.d/linbit/drbd \
77 ${datadir}/cluster/drbd.sh.drbd-utils \
78 ${datadir}/cluster/drbd.metadata \
79 ${sysconfdir}/ha.d/resource.d/drbddisk \
80 ${sysconfdir}/ha.d/resource.d/drbdupper \
81 ${sysconfdir}/bash_completion.d/drbdadm* \
82 ${systemd_system_unitdir}/drbd.service \
85 inherit update-alternatives
86 ALTERNATIVE_PRIORITY = "80"
87 ALTERNATIVE_${PN} = "drbd.sh"
88 ALTERNATIVE_LINK_NAME[drbd.sh] = "${datadir}/cluster/drbd.sh"
91 mv ${D}${datadir}/cluster/drbd.sh ${D}${datadir}/cluster/drbd.sh.drbd-utils
92 install -d -m 755 ${D}/${systemd_system_unitdir}
93 install -p -D -m 644 ${WORKDIR}/drbd.service ${D}/${systemd_system_unitdir}
97 #SYSTEMD_PACKAGES += "${PN}"
98 #SYSTEMD_SERVICE_${PN} = "drbd.service"
100 pkg_postinst_ontarget_drbd-utils() {
101 ${base_bindir}/systemctl enable drbd.service