aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-connectivity
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2020-01-22 18:05:05 +0000
committerBruce Ashfield <bruce.ashfield@gmail.com>2020-01-22 18:05:05 +0000
commit63abf0e38689ba4fa3edc01f840dcf47a359a80c (patch)
tree65ed360ddcc1c8a8f10f5587e43d328752d248f4 /recipes-connectivity
parent1d174d4e851b1dc74c4c4778cf7d0c52d1f38142 (diff)
downloadmeta-cloud-services-63abf0e38689ba4fa3edc01f840dcf47a359a80c.tar.gz
meta-cloud-services-63abf0e38689ba4fa3edc01f840dcf47a359a80c.tar.bz2
meta-cloud-services-63abf0e38689ba4fa3edc01f840dcf47a359a80c.zip
bbappends: make distro feature conditional
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-connectivity')
-rw-r--r--recipes-connectivity/dhcp/dhcp_%.bbappend17
-rw-r--r--recipes-connectivity/dhcp/dhcp_virtualization.inc16
2 files changed, 17 insertions, 16 deletions
diff --git a/recipes-connectivity/dhcp/dhcp_%.bbappend b/recipes-connectivity/dhcp/dhcp_%.bbappend
index 7466056c..617caccb 100644
--- a/recipes-connectivity/dhcp/dhcp_%.bbappend
+++ b/recipes-connectivity/dhcp/dhcp_%.bbappend
@@ -1,16 +1 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-SRC_URI += "file://dhclient-exit-hooks \
- "
-
-do_install_append () {
- install -m 0644 ${WORKDIR}/dhclient-exit-hooks ${D}${sysconfdir}/dhcp/dhclient-exit-hooks
- sed 's%/etc/dhclient-exit-hooks%/etc/dhcp/dhclient-exit-hooks%g' -i ${D}${base_sbindir}/dhclient-script
-
- sed 's%request .*%\noption classless-static-routes code 121 = array of unsigned integer 8;\n\n&%g' -i ${D}${sysconfdir}/dhcp/dhclient.conf
- sed 's%netbios-name-servers,.*netbios-scope;%netbios-name-servers, netbios-scope, classless-static-routes;\n%g' -i ${D}${sysconfdir}/dhcp/dhclient.conf
-
-}
-
-FILES_${PN}-client += "${sysconfdir}/dhcp/dhclient-exit-hooks \
- "
+require ${@bb.utils.contains('DISTRO_FEATURES', 'virtualization', '${BPN}_virtualization.inc', '', d)}
diff --git a/recipes-connectivity/dhcp/dhcp_virtualization.inc b/recipes-connectivity/dhcp/dhcp_virtualization.inc
new file mode 100644
index 00000000..7466056c
--- /dev/null
+++ b/recipes-connectivity/dhcp/dhcp_virtualization.inc
@@ -0,0 +1,16 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+SRC_URI += "file://dhclient-exit-hooks \
+ "
+
+do_install_append () {
+ install -m 0644 ${WORKDIR}/dhclient-exit-hooks ${D}${sysconfdir}/dhcp/dhclient-exit-hooks
+ sed 's%/etc/dhclient-exit-hooks%/etc/dhcp/dhclient-exit-hooks%g' -i ${D}${base_sbindir}/dhclient-script
+
+ sed 's%request .*%\noption classless-static-routes code 121 = array of unsigned integer 8;\n\n&%g' -i ${D}${sysconfdir}/dhcp/dhclient.conf
+ sed 's%netbios-name-servers,.*netbios-scope;%netbios-name-servers, netbios-scope, classless-static-routes;\n%g' -i ${D}${sysconfdir}/dhcp/dhclient.conf
+
+}
+
+FILES_${PN}-client += "${sysconfdir}/dhcp/dhclient-exit-hooks \
+ "