aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-connectivity/dhcp/dhcp_4.2.3-P2.bbappend
diff options
context:
space:
mode:
authorAndy Ning <andy.ning@windriver.com>2014-06-24 10:33:50 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2014-06-24 16:33:32 -0400
commitae839bbb369dd33d6cb53290d0a2ad3d5a72ec49 (patch)
tree31e266e1413da7fd630856a716c2047c877211fd /recipes-connectivity/dhcp/dhcp_4.2.3-P2.bbappend
parent1ee2c197f4d888eee4eb9e3543faf1b4af8915bc (diff)
downloadmeta-cloud-services-ae839bbb369dd33d6cb53290d0a2ad3d5a72ec49.tar.gz
meta-cloud-services-ae839bbb369dd33d6cb53290d0a2ad3d5a72ec49.tar.bz2
meta-cloud-services-ae839bbb369dd33d6cb53290d0a2ad3d5a72ec49.zip
dhcp: add dhcp classless static route support
dhclient needs to be configured to request classess static routes (option code 121) from dhcp server. And dhclient-script will call dhclient-exit-hooks which will parse and add the static routes received from dhcp server into the routing table. The support are built into both controller image and usb guest image, but only guest image makes use of it to add static route for instance to access metadata. Signed-off-by: Andy Ning <andy.ning@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'recipes-connectivity/dhcp/dhcp_4.2.3-P2.bbappend')
-rw-r--r--recipes-connectivity/dhcp/dhcp_4.2.3-P2.bbappend16
1 files changed, 16 insertions, 0 deletions
diff --git a/recipes-connectivity/dhcp/dhcp_4.2.3-P2.bbappend b/recipes-connectivity/dhcp/dhcp_4.2.3-P2.bbappend
new file mode 100644
index 00000000..f5fb44ad
--- /dev/null
+++ b/recipes-connectivity/dhcp/dhcp_4.2.3-P2.bbappend
@@ -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\nrequest &%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_dhcp-client += "${sysconfdir}/dhcp/dhclient-exit-hooks \
+ "