blob: 519ca8d8c24a744559c4b4d23d7cd4b9ec28168c [file] [log] [blame]
Jerry Wan4cee2fc2022-01-21 10:00:10 +08001FILESEXTRAPATHS:prepend:s6q := "${THISDIR}/${PN}:"
2
3SRC_URI:append:s6q = "file://s6q-resolv.conf"
4SRC_URI:append:s6q = "${@bb.utils.contains('MACHINE_FEATURES', 'bonding', ' file://10-bmc-bond0.netdev', '', d)}"
5SRC_URI:append:s6q = "${@bb.utils.contains('MACHINE_FEATURES', 'bonding', ' file://bond-eth0.conf', '', d)}"
6SRC_URI:append:s6q = "${@bb.utils.contains('MACHINE_FEATURES', 'bonding', ' file://bond-eth1.conf', '', d)}"
7
8FILES:${PN}:append:s6q = "${sysconfdir_native}/systemd/resolved.conf.d/s6q-resolv.conf"
9FILES:${PN}:append:s6q = "${@bb.utils.contains("MACHINE_FEATURES", "bonding", " ${sysconfdir_native}/systemd/network/10-bmc-bond0.netdev", "", d)}"
10FILES:${PN}:append:s6q = "${@bb.utils.contains("MACHINE_FEATURES", "bonding", " ${sysconfdir_native}/systemd/network/00-bmc-eth0.network.d/bond-eth0.conf", "", d)}"
11FILES:${PN}:append:s6q = "${@bb.utils.contains("MACHINE_FEATURES", "bonding", " ${sysconfdir_native}/systemd/network/00-bmc-eth1.network.d/bond-eth1.conf", "", d)}"
12
13do_install:append:s6q() {
14 install -d ${D}${sysconfdir_native}/systemd/resolved.conf.d/
15 install -m 0644 ${WORKDIR}/s6q-resolv.conf ${D}${sysconfdir_native}/systemd/resolved.conf.d/
16 if ${@bb.utils.contains('MACHINE_FEATURES', 'bonding', 'true', 'false', d)}; then
17 install -d ${D}${sysconfdir_native}/systemd/network/
18 install -d ${D}${sysconfdir_native}/systemd/network/00-bmc-eth0.network.d/
19 install -d ${D}${sysconfdir_native}/systemd/network/00-bmc-eth1.network.d/
20 install -m 0644 ${WORKDIR}/bond-eth0.conf ${D}${sysconfdir_native}/systemd/network/00-bmc-eth0.network.d/
21 install -m 0644 ${WORKDIR}/bond-eth1.conf ${D}${sysconfdir_native}/systemd/network/00-bmc-eth1.network.d/
22 install -m 0644 ${WORKDIR}/10-bmc-bond0.netdev ${D}${sysconfdir_native}/systemd/network
23 fi
24}