aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-support/dnsmasq/dnsmasq.inc
diff options
context:
space:
mode:
authorJens Rehsack <rehsack@gmail.com>2016-02-28 13:34:22 +0100
committerJoe MacDonald <joe_macdonald@mentor.com>2016-04-01 12:05:27 -0400
commit2497cf2960537152427c99629b2af412787eb6c2 (patch)
tree2f3559f93ffa4b6bf0fde2f5c05ac720ce12fd6a /meta-networking/recipes-support/dnsmasq/dnsmasq.inc
parente6c6a5dfea7c452e0549194131ea3367a3e0459d (diff)
downloadmeta-openembedded-2497cf2960537152427c99629b2af412787eb6c2.tar.gz
dnsmasq: steal resolvconf support from Ubuntu
Add support for resolvconf integration as done in Ubuntu. This implies updates of start-scripts, resolvconf plugin (on nameserver update ...), populate-volatiles control file for saved nameserver list. Signed-off-by: Jens Rehsack <sno@netbsd.org> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
Diffstat (limited to 'meta-networking/recipes-support/dnsmasq/dnsmasq.inc')
-rw-r--r--meta-networking/recipes-support/dnsmasq/dnsmasq.inc10
1 files changed, 10 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/dnsmasq/dnsmasq.inc b/meta-networking/recipes-support/dnsmasq/dnsmasq.inc
index 7fec606782..622e630679 100644
--- a/meta-networking/recipes-support/dnsmasq/dnsmasq.inc
+++ b/meta-networking/recipes-support/dnsmasq/dnsmasq.inc
@@ -23,6 +23,7 @@ PACKAGECONFIG[dbus] = ",,dbus"
PACKAGECONFIG[idn] = ",,libidn"
PACKAGECONFIG[conntrack] = ",,libnetfilter-conntrack"
PACKAGECONFIG[lua] = ",,lua"
+PACKAGECONFIG[resolvconf] = ",,,resolvconf"
EXTRA_OEMAKE = "\
'COPTS=${@base_contains('PACKAGECONFIG', 'dbus', '-DHAVE_DBUS', '', d)} \
${@base_contains('PACKAGECONFIG', 'idn', '-DHAVE_IDN', '', d)} \
@@ -32,6 +33,8 @@ EXTRA_OEMAKE = "\
'LDFLAGS=${LDFLAGS}' \
"
+SRC_URI += "${@bb.utils.contains('PACKAGECONFIG', 'resolvconf', 'file://dnsmasq.resolvconf file://99_dnsmasq', '', d)}"
+
do_compile_append() {
# build dhcp_release
cd ${S}/contrib/wrt
@@ -56,6 +59,13 @@ do_install () {
install -d ${D}${sysconfdir}/dbus-1/system.d
install -m 644 dbus/dnsmasq.conf ${D}${sysconfdir}/dbus-1/system.d/
fi
+ if [ "${@base_contains('PACKAGECONFIG', 'resolvconf', 'resolvconf', '', d)}" != "" ]; then
+ install -d ${D}${sysconfdir}/resolvconf/update.d/
+ install -m 0755 ${WORKDIR}/dnsmasq.resolvconf ${D}${sysconfdir}/resolvconf/update.d/dnsmasq
+
+ install -d ${D}${sysconfdir}/default/volatiles
+ install -m 0644 ${WORKDIR}/99_dnsmasq ${D}${sysconfdir}/default/volatiles
+ fi
}
CONFFILES_${PN} = "${sysconfdir}/dnsmasq.conf"