Squashed 'yocto-poky/' content from commit ea562de

git-subtree-dir: yocto-poky
git-subtree-split: ea562de57590c966cd5a75fda8defecd397e6436
diff --git a/meta/recipes-connectivity/dhcp/dhcp.inc b/meta/recipes-connectivity/dhcp/dhcp.inc
new file mode 100644
index 0000000..d883a8d
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp.inc
@@ -0,0 +1,115 @@
+SECTION = "console/network"
+SUMMARY = "Internet Software Consortium DHCP package"
+DESCRIPTION = "DHCP (Dynamic Host Configuration Protocol) is a protocol \
+which allows individual devices on an IP network to get their own \
+network configuration information from a server.  DHCP helps make it \
+easier to administer devices."
+
+HOMEPAGE = "http://www.isc.org/"
+
+LICENSE = "ISC"
+LIC_FILES_CHKSUM = "file://LICENSE;beginline=4;md5=c5c64d696107f84b56fe337d14da1753"
+
+DEPENDS = "openssl bind"
+
+SRC_URI = "ftp://ftp.isc.org/isc/dhcp/${PV}/dhcp-${PV}.tar.gz \
+           file://define-macro-_PATH_DHCPD_CONF-and-_PATH_DHCLIENT_CON.patch \
+           file://init-relay file://default-relay \
+           file://init-server file://default-server \
+           file://dhclient.conf file://dhcpd.conf \
+           file://dhcpd.service file://dhcrelay.service \
+           file://dhcpd6.service "
+
+inherit autotools systemd
+
+SYSTEMD_PACKAGES = "${PN}-server ${PN}-relay"
+SYSTEMD_SERVICE_${PN}-server = "dhcpd.service dhcpd6.service"
+SYSTEMD_AUTO_ENABLE_${PN}-server = "disable"
+
+SYSTEMD_SERVICE_${PN}-relay = "dhcrelay.service"
+SYSTEMD_AUTO_ENABLE_${PN}-relay = "disable"
+
+TARGET_CFLAGS += "-D_GNU_SOURCE"
+EXTRA_OECONF = "--with-srv-lease-file=${localstatedir}/lib/dhcp/dhcpd.leases \
+                --with-srv6-lease-file=${localstatedir}/lib/dhcp/dhcpd6.leases \
+                --with-cli-lease-file=${localstatedir}/lib/dhcp/dhclient.leases \
+                --with-cli6-lease-file=${localstatedir}/lib/dhcp/dhclient6.leases \
+                --with-libbind=${STAGING_LIBDIR}/ \
+               "
+
+do_install_append () {
+	install -d ${D}${sysconfdir}/init.d
+	install -d ${D}${sysconfdir}/default
+	install -d ${D}${sysconfdir}/dhcp
+	install -m 0755 ${WORKDIR}/init-relay ${D}${sysconfdir}/init.d/dhcp-relay
+	install -m 0644 ${WORKDIR}/default-relay ${D}${sysconfdir}/default/dhcp-relay
+	install -m 0755 ${WORKDIR}/init-server ${D}${sysconfdir}/init.d/dhcp-server
+	install -m 0644 ${WORKDIR}/default-server ${D}${sysconfdir}/default/dhcp-server
+
+	rm -f ${D}${sysconfdir}/dhclient.conf*
+	rm -f ${D}${sysconfdir}/dhcpd.conf*
+	install -m 0644 ${WORKDIR}/dhclient.conf ${D}${sysconfdir}/dhcp/dhclient.conf
+	install -m 0644 ${WORKDIR}/dhcpd.conf ${D}${sysconfdir}/dhcp/dhcpd.conf
+
+	install -d ${D}${base_sbindir}/
+	if [ "${sbindir}" != "${base_sbindir}" ]; then
+		mv ${D}${sbindir}/dhclient ${D}${base_sbindir}/
+	fi
+	install -m 0755 ${S}/client/scripts/linux ${D}${base_sbindir}/dhclient-script
+
+	# Install systemd unit files
+	install -d ${D}${systemd_unitdir}/system
+	install -m 0644 ${WORKDIR}/dhcpd.service ${D}${systemd_unitdir}/system
+	install -m 0644 ${WORKDIR}/dhcpd6.service ${D}${systemd_unitdir}/system
+	install -m 0644 ${WORKDIR}/dhcrelay.service ${D}${systemd_unitdir}/system
+	sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/dhcpd*.service ${D}${systemd_unitdir}/system/dhcrelay.service
+	sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' ${D}${systemd_unitdir}/system/dhcpd*.service
+	sed -i -e 's,@base_bindir@,${base_bindir},g' ${D}${systemd_unitdir}/system/dhcpd*.service
+	sed -i -e 's,@localstatedir@,${localstatedir},g' ${D}${systemd_unitdir}/system/dhcpd*.service
+}
+
+PACKAGES += "dhcp-server dhcp-server-config dhcp-client dhcp-relay dhcp-omshell"
+
+FILES_${PN} = ""
+RDEPENDS_${PN}-dev = ""
+RDEPENDS_${PN}-staticdev = ""
+
+FILES_${PN}-server = "${sbindir}/dhcpd ${sysconfdir}/init.d/dhcp-server"
+RRECOMMENDS_${PN}-server = "dhcp-server-config"
+
+FILES_${PN}-server-config = "${sysconfdir}/default/dhcp-server ${sysconfdir}/dhcp/dhcpd.conf"
+
+FILES_${PN}-relay = "${sbindir}/dhcrelay ${sysconfdir}/init.d/dhcp-relay ${sysconfdir}/default/dhcp-relay"
+
+FILES_${PN}-client = "${base_sbindir}/dhclient ${base_sbindir}/dhclient-script ${sysconfdir}/dhcp/dhclient.conf"
+RDEPENDS_${PN}-client = "bash"
+
+FILES_${PN}-omshell = "${bindir}/omshell"
+
+pkg_postinst_dhcp-server() {
+    mkdir -p $D/${localstatedir}/lib/dhcp
+    touch $D/${localstatedir}/lib/dhcp/dhcpd.leases
+    touch $D/${localstatedir}/lib/dhcp/dhcpd6.leases
+}
+
+pkg_postinst_dhcp-client() {
+    mkdir -p $D/${localstatedir}/lib/dhcp
+}
+
+pkg_postrm_dhcp-server() {
+    rm -f $D/${localstatedir}/lib/dhcp/dhcpd.leases
+    rm -f $D/${localstatedir}/lib/dhcp/dhcpd6.leases
+
+    if ! rmdir $D/${localstatedir}/lib/dhcp 2>/dev/null; then
+        echo "Not removing ${localstatedir}/lib/dhcp as it is non-empty."
+    fi
+}
+
+pkg_postrm_dhcp-client() {
+    rm -f $D/${localstatedir}/lib/dhcp/dhclient.leases
+    rm -f $D/${localstatedir}/lib/dhcp/dhclient6.leases
+
+    if ! rmdir $D/${localstatedir}/lib/dhcp 2>/dev/null; then
+        echo "Not removing ${localstatedir}/lib/dhcp as it is non-empty."
+    fi
+}
diff --git a/meta/recipes-connectivity/dhcp/dhcp/define-macro-_PATH_DHCPD_CONF-and-_PATH_DHCLIENT_CON.patch b/meta/recipes-connectivity/dhcp/dhcp/define-macro-_PATH_DHCPD_CONF-and-_PATH_DHCLIENT_CON.patch
new file mode 100644
index 0000000..12d3c9b
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp/define-macro-_PATH_DHCPD_CONF-and-_PATH_DHCLIENT_CON.patch
@@ -0,0 +1,26 @@
+define macro _PATH_DHCPD_CONF and _PATH_DHCLIENT_CONF
+
+Upstream-Status: inappropriate <oe specific>
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ includes/site.h | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/includes/site.h b/includes/site.h
+index d87b309..17bc40d 100644
+--- a/includes/site.h
++++ b/includes/site.h
+@@ -139,7 +139,8 @@
+ /* Define this if you want the dhcpd.conf file to go somewhere other than
+    the default location.   By default, it goes in /etc/dhcpd.conf. */
+ 
+-/* #define _PATH_DHCPD_CONF	"/etc/dhcpd.conf" */
++#define _PATH_DHCPD_CONF	"/etc/dhcp/dhcpd.conf"
++#define _PATH_DHCLIENT_CONF	"/etc/dhcp/dhclient.conf"
+ 
+ /* Network API definitions.   You do not need to choose one of these - if
+    you don't choose, one will be chosen for you in your system's config
+-- 
+1.9.1
+
diff --git a/meta/recipes-connectivity/dhcp/dhcp/dhclient-script-drop-resolv.conf.dhclient.patch b/meta/recipes-connectivity/dhcp/dhcp/dhclient-script-drop-resolv.conf.dhclient.patch
new file mode 100644
index 0000000..47ea555
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp/dhclient-script-drop-resolv.conf.dhclient.patch
@@ -0,0 +1,70 @@
+dhcp-client: fix invoke dhclient-script failed on Read-only file system
+
+In read-only file system, '/etc' is on the readonly partition,
+and '/etc/resolv.conf' is symlinked to a separate writable
+partition.
+
+In this situation, we should use shell variable to instead of
+temp files '/etc/resolv.conf.dhclient' and '/etc/resolv.conf.dhclient6'.
+
+Upstream-Status: Pending
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ client/scripts/linux | 20 +++++++++-----------
+ 1 file changed, 9 insertions(+), 11 deletions(-)
+
+diff --git a/client/scripts/linux b/client/scripts/linux
+--- a/client/scripts/linux
++++ b/client/scripts/linux
+@@ -27,27 +27,25 @@ ip=/sbin/ip
+ 
+ make_resolv_conf() {
+   if [ x"$new_domain_name_servers" != x ]; then
+-    cat /dev/null > /etc/resolv.conf.dhclient
+-    chmod 644 /etc/resolv.conf.dhclient
++    resolv_conf=""
+     if [ x"$new_domain_search" != x ]; then
+-      echo search $new_domain_search >> /etc/resolv.conf.dhclient
++      resolv_conf="search ${new_domain_search}\n"
+     elif [ x"$new_domain_name" != x ]; then
+       # Note that the DHCP 'Domain Name Option' is really just a domain
+       # name, and that this practice of using the domain name option as
+       # a search path is both nonstandard and deprecated.
+-      echo search $new_domain_name >> /etc/resolv.conf.dhclient
++      resolv_conf="search ${new_domain_name}\n"
+     fi
+     for nameserver in $new_domain_name_servers; do
+-      echo nameserver $nameserver >>/etc/resolv.conf.dhclient
++      resolv_conf="${resolv_conf}nameserver ${nameserver}\n"
+     done
+ 
+-    mv /etc/resolv.conf.dhclient /etc/resolv.conf
++    echo -e "${resolv_conf}" > /etc/resolv.conf
+   elif [ "x${new_dhcp6_name_servers}" != x ] ; then
+-    cat /dev/null > /etc/resolv.conf.dhclient6
+-    chmod 644 /etc/resolv.conf.dhclient6
++    resolv_conf=""
+ 
+     if [ "x${new_dhcp6_domain_search}" != x ] ; then
+-      echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6
++      resolv_conf="search ${new_dhcp6_domain_search}\n"
+     fi
+     shopt -s nocasematch 
+     for nameserver in ${new_dhcp6_name_servers} ; do
+@@ -59,11 +57,11 @@ make_resolv_conf() {
+       else
+ 	zone_id=
+       fi
+-      echo nameserver ${nameserver}$zone_id >> /etc/resolv.conf.dhclient6
++      resolv_conf="${resolv_conf}nameserver ${nameserver}$zone_id\n"
+     done
+     shopt -u nocasematch 
+ 
+-    mv /etc/resolv.conf.dhclient6 /etc/resolv.conf
++    echo -e "${resolv_conf}" > /etc/resolv.conf
+   fi
+ }
+ 
+-- 
+1.8.1.2
+
diff --git a/meta/recipes-connectivity/dhcp/dhcp/dhcp-3.0.3-dhclient-dbus.patch b/meta/recipes-connectivity/dhcp/dhcp/dhcp-3.0.3-dhclient-dbus.patch
new file mode 100644
index 0000000..b4a666d
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp/dhcp-3.0.3-dhclient-dbus.patch
@@ -0,0 +1,86 @@
+Upstream-Status: Inappropriate [distribution]
+
+--- client/scripts/bsdos
++++ client/scripts/bsdos
+@@ -47,6 +47,11 @@
+     . /etc/dhcp/dhclient-exit-hooks
+   fi
+ # probably should do something with exit status of the local script
++  if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
++    dbus-send --system --dest=com.redhat.dhcp \
++      --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
++      'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
++  fi
+   exit $exit_status
+ }
+ 
+--- client/scripts/freebsd
++++ client/scripts/freebsd
+@@ -57,6 +57,11 @@
+     . /etc/dhcp/dhclient-exit-hooks
+   fi
+ # probably should do something with exit status of the local script
++  if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
++    dbus-send --system --dest=com.redhat.dhcp \
++      --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
++      'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
++  fi
+   exit $exit_status
+ }
+ 
+--- client/scripts/linux
++++ client/scripts/linux
+@@ -69,6 +69,11 @@
+     . /etc/dhcp/dhclient-exit-hooks
+   fi
+ # probably should do something with exit status of the local script
++  if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
++    dbus-send --system --dest=com.redhat.dhcp \
++      --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
++      'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
++  fi
+   exit $exit_status
+ }
+ 
+--- client/scripts/netbsd
++++ client/scripts/netbsd
+@@ -47,6 +47,11 @@
+     . /etc/dhcp/dhclient-exit-hooks
+   fi
+ # probably should do something with exit status of the local script
++  if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
++    dbus-send --system --dest=com.redhat.dhcp \
++      --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
++      'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
++  fi
+   exit $exit_status
+ }
+ 
+--- client/scripts/openbsd
++++ client/scripts/openbsd
+@@ -47,6 +47,11 @@
+     . /etc/dhcp/dhclient-exit-hooks
+   fi
+ # probably should do something with exit status of the local script
++  if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
++    dbus-send --system --dest=com.redhat.dhcp \
++      --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
++      'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
++  fi
+   exit $exit_status
+ }
+ 
+--- client/scripts/solaris
++++ client/scripts/solaris
+@@ -47,6 +47,11 @@
+     . /etc/dhcp/dhclient-exit-hooks
+   fi
+ # probably should do something with exit status of the local script
++  if [ x$dhc_dbus != x -a $exit_status -eq 0 ]; then
++    dbus-send --system --dest=com.redhat.dhcp \
++      --type=method_call /com/redhat/dhcp/$interface com.redhat.dhcp.set \
++      'string:'"`env | grep -Ev '^(PATH|SHLVL|_|PWD|dhc_dbus)\='`"
++  fi
+   exit $exit_status
+ }
+ 
diff --git a/meta/recipes-connectivity/dhcp/dhcp/fix-external-bind.patch b/meta/recipes-connectivity/dhcp/dhcp/fix-external-bind.patch
new file mode 100644
index 0000000..a291fda
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp/fix-external-bind.patch
@@ -0,0 +1,112 @@
+Upstream-Status: Pending
+
+11/30/2010
+--with-libbind=PATH is available but not used by Makefile,
+this patch is to allow building with external bind
+
+Signed-off-by: Qing He <qing.he@intel.com>
+
+Index: dhcp-4.3.0/Makefile.am
+===================================================================
+--- dhcp-4.3.0.orig/Makefile.am
++++ dhcp-4.3.0/Makefile.am
+@@ -25,7 +25,7 @@ EXTRA_DIST = RELNOTES LICENSE \
+ 	     bind/Makefile bind/bind.tar.gz bind/version.tmp \
+ 	     common/tests/Atffile server/tests/Atffile
+ 
+-SUBDIRS = bind includes tests common dst omapip client dhcpctl relay server
++SUBDIRS = includes tests common dst omapip client dhcpctl relay server
+ 
+ nobase_include_HEADERS = dhcpctl/dhcpctl.h
+ 
+Index: dhcp-4.3.0/client/Makefile.am
+===================================================================
+--- dhcp-4.3.0.orig/client/Makefile.am
++++ dhcp-4.3.0/client/Makefile.am
+@@ -4,8 +4,8 @@ dhclient_SOURCES = clparse.c dhclient.c
+ 		   scripts/bsdos scripts/freebsd scripts/linux scripts/macos \
+ 		   scripts/netbsd scripts/nextstep scripts/openbsd \
+ 		   scripts/solaris scripts/openwrt
+-dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.a ../bind/lib/libirs.a \
+-		 ../bind/lib/libdns.a ../bind/lib/libisccfg.a ../bind/lib/libisc.a
++dhclient_LDADD = ../common/libdhcp.a ../omapip/libomapi.a $(libbind)/libirs.a \
++		 $(libbind)/libdns.a $(libbind)/libisccfg.a $(libbind)/libisc.a
+ man_MANS = dhclient.8 dhclient-script.8 dhclient.conf.5 dhclient.leases.5
+ EXTRA_DIST = $(man_MANS)
+ 
+Index: dhcp-4.3.0/configure.ac
+===================================================================
+--- dhcp-4.3.0.orig/configure.ac
++++ dhcp-4.3.0/configure.ac
+@@ -566,6 +566,7 @@ no)
+ 	libbind="$use_libbind"
+ 	;;
+ esac
++AC_SUBST([libbind])
+ 
+ # OpenLDAP support.
+ AC_ARG_WITH(ldap,
+Index: dhcp-4.3.0/dhcpctl/Makefile.am
+===================================================================
+--- dhcp-4.3.0.orig/dhcpctl/Makefile.am
++++ dhcp-4.3.0/dhcpctl/Makefile.am
+@@ -6,12 +6,12 @@ EXTRA_DIST = $(man_MANS)
+ 
+ omshell_SOURCES = omshell.c
+ omshell_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
+-	        ../bind/lib/libirs.a ../bind/lib/libdns.a \
+-	        ../bind/lib/libisccfg.a ../bind/lib/libisc.a
++	        $(libbind)/libirs.a $(libbind)/libdns.a \
++	        $(libbind)/libisccfg.a $(libbind)/libisc.a
+ 
+ libdhcpctl_a_SOURCES = dhcpctl.c callback.c remote.c
+ 
+ cltest_SOURCES = cltest.c
+ cltest_LDADD = libdhcpctl.a ../common/libdhcp.a ../omapip/libomapi.a \
+-	       ../bind/lib/libirs.a ../bind/lib/libdns.a \
+-               ../bind/lib/libisccfg.a ../bind/lib/libisc.a
++	       $(libbind)/libirs.a $(libbind)/libdns.a \
++               $(libbind)/libisccfg.a $(libbind)/libisc.a
+Index: dhcp-4.3.0/omapip/Makefile.am
+===================================================================
+--- dhcp-4.3.0.orig/omapip/Makefile.am
++++ dhcp-4.3.0/omapip/Makefile.am
+@@ -10,6 +10,6 @@ man_MANS = omapi.3
+ EXTRA_DIST = $(man_MANS)
+ 
+ svtest_SOURCES = test.c
+-svtest_LDADD = libomapi.a ../bind/lib/libirs.a ../bind/lib/libdns.a \
+-		../bind/lib/libisccfg.a ../bind/lib/libisc.a
++svtest_LDADD = libomapi.a $(libbind)/libirs.a $(libbind)/libdns.a \
++		$(libbind)/libisccfg.a $(libbind)/libisc.a
+ 
+Index: dhcp-4.3.0/relay/Makefile.am
+===================================================================
+--- dhcp-4.3.0.orig/relay/Makefile.am
++++ dhcp-4.3.0/relay/Makefile.am
+@@ -3,8 +3,8 @@ AM_CPPFLAGS = -DLOCALSTATEDIR='"@localst
+ sbin_PROGRAMS = dhcrelay
+ dhcrelay_SOURCES = dhcrelay.c
+ dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
+-		 ../bind/lib/libirs.a ../bind/lib/libdns.a \
+-		 ../bind/lib/libisccfg.a ../bind/lib/libisc.a
++		 $(libbind)/libirs.a $(libbind)/libdns.a \
++		 $(libbind)/libisccfg.a $(libbind)/libisc.a
+ man_MANS = dhcrelay.8
+ EXTRA_DIST = $(man_MANS)
+ 
+Index: dhcp-4.3.0/server/Makefile.am
+===================================================================
+--- dhcp-4.3.0.orig/server/Makefile.am
++++ dhcp-4.3.0/server/Makefile.am
+@@ -14,8 +14,8 @@ dhcpd_SOURCES = dhcpd.c dhcp.c bootp.c c
+ 
+ dhcpd_CFLAGS = $(LDAP_CFLAGS)
+ dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
+-	      ../dhcpctl/libdhcpctl.a ../bind/lib/libirs.a \
+-	      ../bind/lib/libdns.a ../bind/lib/libisccfg.a ../bind/lib/libisc.a
++	      ../dhcpctl/libdhcpctl.a $(libbind)/libirs.a \
++	      $(libbind)/libdns.a $(libbind)/libisccfg.a $(libbind)/libisc.a
+ 
+ man_MANS = dhcpd.8 dhcpd.conf.5 dhcpd.leases.5
+ EXTRA_DIST = $(man_MANS)
diff --git a/meta/recipes-connectivity/dhcp/dhcp/fixsepbuild.patch b/meta/recipes-connectivity/dhcp/dhcp/fixsepbuild.patch
new file mode 100644
index 0000000..14e75a3
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp/fixsepbuild.patch
@@ -0,0 +1,108 @@
+Fix out of tree builds
+
+Upstream-Status: Pending
+
+RP 2013/03/21
+
+Rebase to 4.3.1
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ client/Makefile.am  | 6 ++++--
+ common/Makefile.am  | 2 +-
+ dhcpctl/Makefile.am | 2 ++
+ dst/Makefile.am     | 2 +-
+ omapip/Makefile.am  | 2 ++
+ relay/Makefile.am   | 2 +-
+ server/Makefile.am  | 2 +-
+ 7 files changed, 12 insertions(+), 6 deletions(-)
+
+diff --git a/client/Makefile.am b/client/Makefile.am
+index 8411960..1740f72 100644
+--- a/client/Makefile.am
++++ b/client/Makefile.am
+@@ -4,6 +4,8 @@
+ # production code. Sadly, we are not there yet.
+ SUBDIRS = . tests
+ 
++AM_CPPFLAGS = -I$(top_srcdir)/includes
++
+ dist_sysconf_DATA = dhclient.conf.example
+ sbin_PROGRAMS = dhclient
+ dhclient_SOURCES = clparse.c dhclient.c dhc6.c \
+@@ -17,8 +19,8 @@ EXTRA_DIST = $(man_MANS)
+ 
+ dhclient.o: dhclient.c
+ 	$(COMPILE) -DCLIENT_PATH='"PATH=$(sbindir):/sbin:/bin:/usr/sbin:/usr/bin"' \
+-		   -DLOCALSTATEDIR='"$(localstatedir)"' -c dhclient.c
++		   -DLOCALSTATEDIR='"$(localstatedir)"' -c $(srcdir)/dhclient.c
+ 
+ dhc6.o: dhc6.c
+ 	$(COMPILE) -DCLIENT_PATH='"PATH=$(sbindir):/sbin:/bin:/usr/sbin:/usr/bin"' \
+-		   -DLOCALSTATEDIR='"$(localstatedir)"' -c dhc6.c
++		   -DLOCALSTATEDIR='"$(localstatedir)"' -c $(srcdir)/dhc6.c
+diff --git a/common/Makefile.am b/common/Makefile.am
+index eddef05..5ce045f 100644
+--- a/common/Makefile.am
++++ b/common/Makefile.am
+@@ -1,4 +1,4 @@
+-AM_CPPFLAGS = -I.. -DLOCALSTATEDIR='"@localstatedir@"'
++AM_CPPFLAGS = -I$(top_srcdir)/includes -I$(top_srcdir) -DLOCALSTATEDIR='"@localstatedir@"'
+ AM_CFLAGS = $(LDAP_CFLAGS)
+ 
+ noinst_LIBRARIES = libdhcp.a
+diff --git a/dhcpctl/Makefile.am b/dhcpctl/Makefile.am
+index 2987a53..cd72d75 100644
+--- a/dhcpctl/Makefile.am
++++ b/dhcpctl/Makefile.am
+@@ -1,3 +1,5 @@
++AM_CPPFLAGS = -I$(top_srcdir)/includes -I$(top_srcdir)
++
+ bin_PROGRAMS = omshell
+ lib_LIBRARIES = libdhcpctl.a
+ noinst_PROGRAMS = cltest
+diff --git a/dst/Makefile.am b/dst/Makefile.am
+index 8937fe8..a14798b 100644
+--- a/dst/Makefile.am
++++ b/dst/Makefile.am
+@@ -1,4 +1,4 @@
+-AM_CPPFLAGS = -DMINIRES_LIB -DHMAC_MD5
++AM_CPPFLAGS = -DMINIRES_LIB -DHMAC_MD5 -I$(top_srcdir)/includes
+ 
+ lib_LIBRARIES = libdst.a
+ 
+diff --git a/omapip/Makefile.am b/omapip/Makefile.am
+index 5074479..9c0fab3 100644
+--- a/omapip/Makefile.am
++++ b/omapip/Makefile.am
+@@ -1,3 +1,5 @@
++AM_CPPFLAGS = -I$(top_srcdir)/includes
++
+ lib_LIBRARIES = libomapi.a
+ noinst_PROGRAMS = svtest
+ 
+diff --git a/relay/Makefile.am b/relay/Makefile.am
+index ec72a31..f842071 100644
+--- a/relay/Makefile.am
++++ b/relay/Makefile.am
+@@ -1,4 +1,4 @@
+-AM_CPPFLAGS = -DLOCALSTATEDIR='"@localstatedir@"'
++AM_CPPFLAGS = -DLOCALSTATEDIR='"@localstatedir@"' -I$(top_srcdir)/includes
+ 
+ sbin_PROGRAMS = dhcrelay
+ dhcrelay_SOURCES = dhcrelay.c
+diff --git a/server/Makefile.am b/server/Makefile.am
+index a446f0b..d0b873a 100644
+--- a/server/Makefile.am
++++ b/server/Makefile.am
+@@ -4,7 +4,7 @@
+ # production code. Sadly, we are not there yet.
+ SUBDIRS = . tests
+ 
+-AM_CPPFLAGS = -I.. -DLOCALSTATEDIR='"@localstatedir@"'
++AM_CPPFLAGS = -I$(top_srcdir) -DLOCALSTATEDIR='"@localstatedir@"' -I$(top_srcdir)/includes
+ 
+ dist_sysconf_DATA = dhcpd.conf.example
+ sbin_PROGRAMS = dhcpd
+-- 
+1.9.1
+
diff --git a/meta/recipes-connectivity/dhcp/dhcp/link-with-lcrypto.patch b/meta/recipes-connectivity/dhcp/dhcp/link-with-lcrypto.patch
new file mode 100644
index 0000000..57e10b0
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp/link-with-lcrypto.patch
@@ -0,0 +1,25 @@
+Author: Andrei Gherzan <andrei@gherzan.ro>
+Date:   Thu Feb 2 23:59:11 2012 +0200
+
+From 4.2.0 final release, -lcrypto check was removed and we compile static libraries
+from bind that are linked to libcrypto. This is why i added a patch in order to add
+-lcrypto to LIBS.
+
+Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
+Upstream-Status: Pending
+
+Index: dhcp-4.2.3-P2-r0/dhcp-4.2.3-P2/configure.ac
+===================================================================
+--- dhcp-4.2.3-P2.orig/configure.ac	2012-02-02 18:04:20.843023196 +0200
++++ dhcp-4.2.3-P2/configure.ac	2012-02-02 17:58:16.000000000 +0200
+@@ -456,6 +456,10 @@
+ # Look for optional headers.
+ AC_CHECK_HEADERS(sys/socket.h net/if_dl.h net/if6.h regex.h)
+ 
++# find an MD5 library
++AC_SEARCH_LIBS(MD5_Init, [crypto])
++AC_SEARCH_LIBS(MD5Init, [crypto])
++
+ # Solaris needs some libraries for functions
+ AC_SEARCH_LIBS(socket, [socket])
+ AC_SEARCH_LIBS(inet_ntoa, [nsl])
diff --git a/meta/recipes-connectivity/dhcp/dhcp/replace-ifconfig-route.patch b/meta/recipes-connectivity/dhcp/dhcp/replace-ifconfig-route.patch
new file mode 100644
index 0000000..61dd6a7
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp/replace-ifconfig-route.patch
@@ -0,0 +1,176 @@
+Found this patch here:
+https://lists.isc.org/pipermail/dhcp-users/2011-January/012910.html
+
+and made some adjustments/updates to make it work with this version.
+Wasn't able to find that why this patch was not accepted by ISC DHCP developers.
+
+Upstream-Status: Pending
+
+Signed-off-by: Muhammad Shakeel <muhammad_shakeel@mentor.com>
+
+--- dhcp-4.2.5-P1/client/scripts/linux.orig	2013-09-04 12:22:55.000000000 +0500
++++ dhcp-4.2.5-P1/client/scripts/linux	2013-09-04 12:52:19.068761518 +0500
+@@ -103,17 +103,11 @@
+ if [ x$old_broadcast_address != x ]; then
+   old_broadcast_arg="broadcast $old_broadcast_address"
+ fi
+-if [ x$new_subnet_mask != x ]; then
+-  new_subnet_arg="netmask $new_subnet_mask"
+-fi
+-if [ x$old_subnet_mask != x ]; then
+-  old_subnet_arg="netmask $old_subnet_mask"
+-fi
+-if [ x$alias_subnet_mask != x ]; then
+-  alias_subnet_arg="netmask $alias_subnet_mask"
++if [ -n "$new_subnet_mask" ]; then
++    new_mask="/$new_subnet_mask"
+ fi
+-if [ x$new_interface_mtu != x ]; then
+-  mtu_arg="mtu $new_interface_mtu"
++if [ -n "$alias_subnet_mask" ]; then
++    alias_mask="/$alias_subnet_mask"
+ fi
+ if [ x$IF_METRIC != x ]; then
+   metric_arg="metric $IF_METRIC"
+@@ -127,9 +121,9 @@
+ if [ x$reason = xPREINIT ]; then
+   if [ x$alias_ip_address != x ]; then
+     # Bring down alias interface. Its routes will disappear too.
+-    ifconfig $interface:0- inet 0
++    ${ip} -4 addr flush dev ${interface} label ${interface}:0
+   fi
+-  ifconfig $interface 0 up
++  ${ip} link set dev ${interface} up
+ 
+   # We need to give the kernel some time to get the interface up.
+   sleep 1
+@@ -156,25 +150,30 @@
+   if [ x$old_ip_address != x ] && [ x$alias_ip_address != x ] && \
+ 		[ x$alias_ip_address != x$old_ip_address ]; then
+     # Possible new alias. Remove old alias.
+-    ifconfig $interface:0- inet 0
++    ${ip} -4 addr flush dev ${interface} label ${interface}:0
+   fi
+   if [ x$old_ip_address != x ] && [ x$old_ip_address != x$new_ip_address ]; then
+     # IP address changed. Bringing down the interface will delete all routes,
+     # and clear the ARP cache.
+-    ifconfig $interface inet 0 down
++    ${ip} -4 addr flush dev ${interface} label ${interface}
+ 
+   fi
+   if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
+      [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
+ 
+-    ifconfig $interface inet $new_ip_address $new_subnet_arg \
+-					$new_broadcast_arg $mtu_arg
++    ${ip} -4 addr add ${new_ip_address}${new_mask} ${new_broadcast_arg} \
++                dev ${interface} label ${interface}
++    if [ -n "$new_interface_mtu" ]; then
++      # set MTU
++      ${ip} link set dev ${interface} mtu ${new_interface_mtu}
++    fi
+     # Add a network route to the computed network address.
+     for router in $new_routers; do
+       if [ "x$new_subnet_mask" = "x255.255.255.255" ] ; then
+-	route add -host $router dev $interface
++        ${ip} -4 route add ${router} dev $interface >/dev/null 2>&1
+       fi
+-      route add default gw $router $metric_arg dev $interface
++      ${ip} -4 route add default via ${router} dev ${interface} \
++        ${metric_arg} >/dev/null 2>&1
+     done
+   else
+     # we haven't changed the address, have we changed other options           
+@@ -182,21 +181,23 @@
+     if [ x$new_routers != x ] && [ x$new_routers != x$old_routers ] ; then
+       # if we've changed routers delete the old and add the new.
+       for router in $old_routers; do
+-        route del default gw $router
++        ${ip} -4 route delete default via ${router}
+       done
+       for router in $new_routers; do
+         if [ "x$new_subnet_mask" = "x255.255.255.255" ] ; then
+-	  route add -host $router dev $interface
+-	fi
+-	route add default gw $router $metric_arg dev $interface
++	      ${ip} -4 route add ${router} dev $interface >/dev/null 2>&1
++	    fi
++        ${ip} -4 route add default via ${router} dev ${interface} \
++          ${metric_arg} >/dev/null 2>&1
+       done
+     fi
+   fi
+   if [ x$new_ip_address != x$alias_ip_address ] && [ x$alias_ip_address != x ];
+    then
+-    ifconfig $interface:0- inet 0
+-    ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg
+-    route add -host $alias_ip_address $interface:0
++    ${ip} -4 addr flush dev ${interface} label ${interface}:0
++    ${ip} -4 addr add ${alias_ip_address}${alias_mask} \
++        dev ${interface} label ${interface}:0
++    ${ip} -4 route add ${alias_ip_address} dev ${interface} >/dev/null 2>&1
+   fi
+   make_resolv_conf
+   exit_with_hooks 0
+@@ -206,42 +207,49 @@
+    || [ x$reason = xSTOP ]; then
+   if [ x$alias_ip_address != x ]; then
+     # Turn off alias interface.
+-    ifconfig $interface:0- inet 0
++    ${ip} -4 addr flush dev ${interface} label ${interface}:0
+   fi
+   if [ x$old_ip_address != x ]; then
+     # Shut down interface, which will delete routes and clear arp cache.
+-    ifconfig $interface inet 0 down
++    ${ip} -4 addr flush dev ${interface} label ${interface}
+   fi
+   if [ x$alias_ip_address != x ]; then
+-    ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg
+-    route add -host $alias_ip_address $interface:0
++    ${ip} -4 addr add ${alias_ip_address}${alias_network_arg} \
++        dev ${interface} label ${interface}:0
++    ${ip} -4 route add ${alias_ip_address} dev ${interface} >/dev/null 2>&1
+   fi
+   exit_with_hooks 0
+ fi
+ 
+ if [ x$reason = xTIMEOUT ]; then
+   if [ x$alias_ip_address != x ]; then
+-    ifconfig $interface:0- inet 0
++    ${ip} -4 addr flush dev ${interface} label ${interface}:0
++  fi
++  ${ip} -4 addr add ${new_ip_address}${new_mask} ${new_broadcast_arg} \
++            dev ${interface} label ${interface}
++  if [ -n "$new_interface_mtu" ]; then
++    # set MTU
++    ip link set dev ${interface} mtu ${new_interface_mtu}
+   fi
+-  ifconfig $interface inet $new_ip_address $new_subnet_arg \
+-					$new_broadcast_arg $mtu_arg
+   set $new_routers
+   if ping -q -c 1 $1; then
+     if [ x$new_ip_address != x$alias_ip_address ] && \
+ 			[ x$alias_ip_address != x ]; then
+-      ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg
+-      route add -host $alias_ip_address dev $interface:0
++      ${ip} -4 addr add ${alias_ip_address}${alias_mask} \
++            dev ${interface} label ${interface}:0
++      ${ip} -4 route add ${alias_ip_address} dev ${interface} >/dev/null 2>&1
+     fi
+     for router in $new_routers; do
+       if [ "x$new_subnet_mask" = "x255.255.255.255" ] ; then
+-	route add -host $router dev $interface
++	    ${ip} -4 route add ${router} dev $interface >/dev/null 2>&1
+       fi
+-      route add default gw $router $metric_arg dev $interface
++      ${ip} -4 route add default via ${router} dev ${interface} \
++        ${metric_arg} >/dev/null 2>&1
+     done
+     make_resolv_conf
+     exit_with_hooks 0
+   fi
+-  ifconfig $interface inet 0 down
++  ${ip} -4 addr flush dev ${interface}
+   exit_with_hooks 1
+ fi
+ 
diff --git a/meta/recipes-connectivity/dhcp/dhcp_4.3.2.bb b/meta/recipes-connectivity/dhcp/dhcp_4.3.2.bb
new file mode 100644
index 0000000..b4a05fc
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp_4.3.2.bb
@@ -0,0 +1,12 @@
+require dhcp.inc
+
+SRC_URI += "file://dhcp-3.0.3-dhclient-dbus.patch;striplevel=0 \
+            file://fix-external-bind.patch \
+            file://link-with-lcrypto.patch \
+            file://fixsepbuild.patch \
+            file://dhclient-script-drop-resolv.conf.dhclient.patch \
+            file://replace-ifconfig-route.patch \
+           "
+
+SRC_URI[md5sum] = "5a284875dd2c12ddd388416d69156a67"
+SRC_URI[sha256sum] = "6246c9b358759f6cdcc45104caaf76e732a211dbbbbf64a21f499c8db1298165"
diff --git a/meta/recipes-connectivity/dhcp/files/default-relay b/meta/recipes-connectivity/dhcp/files/default-relay
new file mode 100644
index 0000000..7961f01
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/files/default-relay
@@ -0,0 +1,12 @@
+# Defaults for dhcp-relay initscript
+# sourced by /etc/init.d/dhcp-relay
+
+# What servers should the DHCP relay forward requests to?
+# e.g: SERVERS="192.168.0.1"
+SERVERS=""
+
+# On what interfaces should the DHCP relay (dhrelay) serve DHCP requests?
+INTERFACES=""
+
+# Additional options that are passed to the DHCP relay daemon?
+OPTIONS=""
diff --git a/meta/recipes-connectivity/dhcp/files/default-server b/meta/recipes-connectivity/dhcp/files/default-server
new file mode 100644
index 0000000..0385d16
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/files/default-server
@@ -0,0 +1,7 @@
+# Defaults for dhcp initscript
+# sourced by /etc/init.d/dhcp-server
+# installed at /etc/default/dhcp-server by the maintainer scripts
+
+# On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
+#       Separate multiple interfaces with spaces, e.g. "eth0 eth1".
+INTERFACES=""
diff --git a/meta/recipes-connectivity/dhcp/files/dhclient.conf b/meta/recipes-connectivity/dhcp/files/dhclient.conf
new file mode 100644
index 0000000..0e6dcf9
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/files/dhclient.conf
@@ -0,0 +1,50 @@
+# Configuration file for /sbin/dhclient, which is included in Debian's
+#	dhcp3-client package.
+#
+# This is a sample configuration file for dhclient. See dhclient.conf's
+#	man page for more information about the syntax of this file
+#	and a more comprehensive list of the parameters understood by
+#	dhclient.
+#
+# Normally, if the DHCP server provides reasonable information and does
+#	not leave anything out (like the domain name, for example), then
+#	few changes must be made to this file, if any.
+#
+
+#send host-name "andare.fugue.com";
+#send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;
+#send dhcp-lease-time 3600;
+#supersede domain-name "fugue.com home.vix.com";
+#prepend domain-name-servers 127.0.0.1;
+request subnet-mask, broadcast-address, time-offset, routers,
+	domain-name, domain-name-servers, host-name,
+	netbios-name-servers, netbios-scope;
+#require subnet-mask, domain-name-servers;
+#timeout 60;
+#retry 60;
+#reboot 10;
+#select-timeout 5;
+#initial-interval 2;
+#script "/etc/dhcp3/dhclient-script";
+#media "-link0 -link1 -link2", "link0 link1";
+#reject 192.33.137.209;
+
+#alias {
+#  interface "eth0";
+#  fixed-address 192.5.5.213;
+#  option subnet-mask 255.255.255.255;
+#}
+
+#lease {
+#  interface "eth0";
+#  fixed-address 192.33.137.200;
+#  medium "link0 link1";
+#  option host-name "andare.swiftmedia.com";
+#  option subnet-mask 255.255.255.0;
+#  option broadcast-address 192.33.137.255;
+#  option routers 192.33.137.250;
+#  option domain-name-servers 127.0.0.1;
+#  renew 2 2000/1/12 00:00:01;
+#  rebind 2 2000/1/12 00:00:01;
+#  expire 2 2000/1/12 00:00:01;
+#}
diff --git a/meta/recipes-connectivity/dhcp/files/dhcpd.conf b/meta/recipes-connectivity/dhcp/files/dhcpd.conf
new file mode 100644
index 0000000..0001c0f
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/files/dhcpd.conf
@@ -0,0 +1,108 @@
+#
+# Sample configuration file for ISC dhcpd for Debian
+#
+# $Id: dhcpd.conf,v 1.1.1.1 2002/05/21 00:07:44 peloy Exp $
+#
+
+# The ddns-updates-style parameter controls whether or not the server will
+# attempt to do a DNS update when a lease is confirmed. We default to the
+# behavior of the version 2 packages ('none', since DHCP v2 didn't
+# have support for DDNS.)
+ddns-update-style none;
+
+# option definitions common to all supported networks...
+option domain-name "example.org";
+option domain-name-servers ns1.example.org, ns2.example.org;
+
+default-lease-time 600;
+max-lease-time 7200;
+
+# If this DHCP server is the official DHCP server for the local
+# network, the authoritative directive should be uncommented.
+#authoritative;
+
+# Use this to send dhcp log messages to a different log file (you also
+# have to hack syslog.conf to complete the redirection).
+log-facility local7;
+
+# No service will be given on this subnet, but declaring it helps the 
+# DHCP server to understand the network topology.
+
+#subnet 10.152.187.0 netmask 255.255.255.0 {
+#}
+
+# This is a very basic subnet declaration.
+
+#subnet 10.254.239.0 netmask 255.255.255.224 {
+#  range 10.254.239.10 10.254.239.20;
+#  option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org;
+#}
+
+# This declaration allows BOOTP clients to get dynamic addresses,
+# which we don't really recommend.
+
+#subnet 10.254.239.32 netmask 255.255.255.224 {
+#  range dynamic-bootp 10.254.239.40 10.254.239.60;
+#  option broadcast-address 10.254.239.31;
+#  option routers rtr-239-32-1.example.org;
+#}
+
+# A slightly different configuration for an internal subnet.
+#subnet 10.5.5.0 netmask 255.255.255.224 {
+#  range 10.5.5.26 10.5.5.30;
+#  option domain-name-servers ns1.internal.example.org;
+#  option domain-name "internal.example.org";
+#  option routers 10.5.5.1;
+#  option broadcast-address 10.5.5.31;
+#  default-lease-time 600;
+#  max-lease-time 7200;
+#}
+
+# Hosts which require special configuration options can be listed in
+# host statements.   If no address is specified, the address will be
+# allocated dynamically (if possible), but the host-specific information
+# will still come from the host declaration.
+
+#host passacaglia {
+#  hardware ethernet 0:0:c0:5d:bd:95;
+#  filename "vmunix.passacaglia";
+#  server-name "toccata.fugue.com";
+#}
+
+# Fixed IP addresses can also be specified for hosts.   These addresses
+# should not also be listed as being available for dynamic assignment.
+# Hosts for which fixed IP addresses have been specified can boot using
+# BOOTP or DHCP.   Hosts for which no fixed address is specified can only
+# be booted with DHCP, unless there is an address range on the subnet
+# to which a BOOTP client is connected which has the dynamic-bootp flag
+# set.
+#host fantasia {
+#  hardware ethernet 08:00:07:26:c0:a5;
+#  fixed-address fantasia.fugue.com;
+#}
+
+# You can declare a class of clients and then do address allocation
+# based on that.   The example below shows a case where all clients
+# in a certain class get addresses on the 10.17.224/24 subnet, and all
+# other clients get addresses on the 10.0.29/24 subnet.
+
+#class "foo" {
+#  match if substring (option vendor-class-identifier, 0, 4) = "SUNW";
+#}
+
+#shared-network 224-29 {
+#  subnet 10.17.224.0 netmask 255.255.255.0 {
+#    option routers rtr-224.example.org;
+#  }
+#  subnet 10.0.29.0 netmask 255.255.255.0 {
+#    option routers rtr-29.example.org;
+#  }
+#  pool {
+#    allow members of "foo";
+#    range 10.17.224.10 10.17.224.250;
+#  }
+#  pool {
+#    deny members of "foo";
+#    range 10.0.29.10 10.0.29.230;
+#  }
+#}
diff --git a/meta/recipes-connectivity/dhcp/files/dhcpd.service b/meta/recipes-connectivity/dhcp/files/dhcpd.service
new file mode 100644
index 0000000..ae4f93e
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/files/dhcpd.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=DHCPv4 Server Daemon
+Documentation=man:dhcpd(8) man:dhcpd.conf(5)
+After=network.target
+After=time-sync.target
+
+[Service]
+PIDFile=@localstatedir@/run/dhcpd.pid
+EnvironmentFile=@SYSCONFDIR@/default/dhcp-server
+EnvironmentFile=-@SYSCONFDIR@/sysconfig/dhcp-server
+ExecStartPre=@base_bindir@/touch @localstatedir@/lib/dhcp/dhcpd.leases
+ExecStart=@SBINDIR@/dhcpd -f -cf @SYSCONFDIR@/dhcp/dhcpd.conf -pf @localstatedir@/run/dhcpd.pid $DHCPDARGS -q $INTERFACES
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta/recipes-connectivity/dhcp/files/dhcpd6.service b/meta/recipes-connectivity/dhcp/files/dhcpd6.service
new file mode 100644
index 0000000..ca96abb
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/files/dhcpd6.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=DHCPv6 Server Daemon
+Documentation=man:dhcpd(8) man:dhcpd.conf(5)
+After=network.target
+After=time-sync.target
+
+[Service]
+PIDFile=@localstatedir@/run/dhcpd6.pid
+EnvironmentFile=@SYSCONFDIR@/default/dhcp-server
+EnvironmentFile=-@SYSCONFDIR@/sysconfig/dhcpd6
+ExecStartPre=@base_bindir@/touch @localstatedir@/lib/dhcp/dhcpd6.leases
+ExecStart=@SBINDIR@/dhcpd -f -6 -cf @SYSCONFDIR@/dhcp/dhcpd.conf -pf @localstatedir@/run/dhcpd6.pid $DHCPDARGS -q $INTERFACES
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta/recipes-connectivity/dhcp/files/dhcrelay.service b/meta/recipes-connectivity/dhcp/files/dhcrelay.service
new file mode 100644
index 0000000..a2d8189
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/files/dhcrelay.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=DHCP Relay Agent Daemon
+After=network.target
+
+[Service]
+ExecStart=@SBINDIR@/dhcrelay -d --no-pid
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta/recipes-connectivity/dhcp/files/init-relay b/meta/recipes-connectivity/dhcp/files/init-relay
new file mode 100644
index 0000000..019a7e8
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/files/init-relay
@@ -0,0 +1,44 @@
+#!/bin/sh
+#
+# $Id: dhcp3-relay,v 1.1 2004/04/16 15:41:08 ml Exp $
+#
+
+# It is not safe to start if we don't have a default configuration...
+if [ ! -f /etc/default/dhcp-relay ]; then
+	echo "/etc/default/dhcp-relay does not exist! - Aborting..."
+	echo "create this file to fix the problem."
+	exit 1
+fi
+
+# Read init script configuration (interfaces the daemon should listen on
+# and the DHCP server we should forward requests to.)
+. /etc/default/dhcp-relay
+
+# Build command line for interfaces (will be passed to dhrelay below.)
+IFCMD=""
+if test "$INTERFACES" != ""; then
+	for I in $INTERFACES; do
+		IFCMD=${IFCMD}"-i "${I}" "
+	done
+fi
+
+DHCRELAYPID=/var/run/dhcrelay.pid
+
+case "$1" in
+	start)
+		start-stop-daemon -S -x /usr/sbin/dhcrelay -- -q $OPTIONS $IFCMD $SERVERS
+		;;
+	stop)
+		start-stop-daemon -K -x /usr/sbin/dhcrelay
+		;;
+	restart | force-reload)
+		$0 stop
+		sleep 2
+		$0 start
+		;;
+	*)
+		echo "Usage: /etc/init.d/dhcp-relay {start|stop|restart|force-reload}"
+		exit 1 
+esac
+
+exit 0
diff --git a/meta/recipes-connectivity/dhcp/files/init-server b/meta/recipes-connectivity/dhcp/files/init-server
new file mode 100644
index 0000000..34c2085
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/files/init-server
@@ -0,0 +1,44 @@
+#!/bin/sh
+#
+# $Id: dhcp3-server.init.d,v 1.4 2003/07/13 19:12:41 mdz Exp $
+#
+
+test -f /usr/sbin/dhcpd || exit 0
+
+# It is not safe to start if we don't have a default configuration...
+if [ ! -f /etc/default/dhcp-server ]; then
+	echo "/etc/default/dhcp-server does not exist! - Aborting..."
+	exit 0
+fi
+
+# Read init script configuration (so far only interfaces the daemon
+# should listen on.)
+. /etc/default/dhcp-server
+
+case "$1" in
+	start)
+		echo -n "Starting DHCP server: "
+		test -d /var/lib/dhcp/ || mkdir -p /var/lib/dhcp/
+		test -f /var/lib/dhcp/dhcpd.leases || touch /var/lib/dhcp/dhcpd.leases	
+		start-stop-daemon -S -x /usr/sbin/dhcpd -- -q $INTERFACES
+		echo "."
+		;;
+	stop)
+		echo -n "Stopping DHCP server: dhcpd3"
+		start-stop-daemon -K -x /usr/sbin/dhcpd
+		echo "."
+		;;
+	restart | force-reload)
+		$0 stop
+		sleep 2
+		$0 start
+		if [ "$?" != "0" ]; then
+			exit 1
+		fi
+		;;
+	*)
+		echo "Usage: /etc/init.d/dhcp-server {start|stop|restart|force-reload}"
+		exit 1 
+esac
+
+exit 0