From 6fc414b361f2a18de6892b1eb0f87ec3aeabd97e Mon Sep 17 00:00:00 2001 From: Vyacheslav Pedash Date: Thu, 4 Feb 2021 14:21:46 +0200 Subject: MTX-3787 Check ENABLED flag in dnsmasq init script --- recipes-support/dnsmasq/dnsmasq_%.bbappend | 4 ++++ recipes-support/dnsmasq/files/init.patch | 12 ++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 recipes-support/dnsmasq/files/init.patch (limited to 'recipes-support') diff --git a/recipes-support/dnsmasq/dnsmasq_%.bbappend b/recipes-support/dnsmasq/dnsmasq_%.bbappend index 7668744..6aa39f8 100644 --- a/recipes-support/dnsmasq/dnsmasq_%.bbappend +++ b/recipes-support/dnsmasq/dnsmasq_%.bbappend @@ -1,6 +1,7 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/files:" SRC_URI += "\ + file://init.patch;patchdir=.. \ file://default \ " @@ -8,3 +9,6 @@ do_install_append () { install -d ${D}${sysconfdir}/ ${D}${sysconfdir}/default install -m 755 ${WORKDIR}/default ${D}${sysconfdir}/default/dnsmasq } + +# init.d/dnsmasq conflicts with AEP. +CONFFILES_${PN} += "${sysconfdir}/init.d/dnsmasq" diff --git a/recipes-support/dnsmasq/files/init.patch b/recipes-support/dnsmasq/files/init.patch new file mode 100644 index 0000000..b6045d2 --- /dev/null +++ b/recipes-support/dnsmasq/files/init.patch @@ -0,0 +1,12 @@ +diff -uprN orig/init new/init +--- orig/init 2019-10-08 20:19:12.000000000 +0300 ++++ new/init 2021-02-04 14:06:17.000000000 +0200 +@@ -13,6 +13,8 @@ then + . /etc/default/$NAME + fi + ++[[ "$ENABLED" = "yes" ]] || exit ++ + DNSMASQ_CONF="/etc/dnsmasq.conf" + test "/etc/dnsmasq.d/*" != '/etc/dnsmasq.d/*' && DNSMASQ_CONF="${DNSMASQ_CONF} /etc/dnsmasq.d/*" + -- cgit v1.2.3