summaryrefslogtreecommitdiff
path: root/recipes-support
diff options
context:
space:
mode:
authorVyacheslav Pedash <vyacheslav.pedash@globallogic.com>2021-02-04 14:21:46 +0200
committerVyacheslav Pedash <vyacheslav.pedash@globallogic.com>2021-02-04 14:27:56 +0200
commit6fc414b361f2a18de6892b1eb0f87ec3aeabd97e (patch)
treea92bd2ad7ab6665b8314e8e23d4b6273eab5a6ef /recipes-support
parent7a5d1ad54702ab46660fc04d334c33c3cb3bddb5 (diff)
downloadmeta-mlinux-6fc414b361f2a18de6892b1eb0f87ec3aeabd97e.tar.gz
meta-mlinux-6fc414b361f2a18de6892b1eb0f87ec3aeabd97e.tar.bz2
meta-mlinux-6fc414b361f2a18de6892b1eb0f87ec3aeabd97e.zip
MTX-3787 Check ENABLED flag in dnsmasq init script
Diffstat (limited to 'recipes-support')
-rw-r--r--recipes-support/dnsmasq/dnsmasq_%.bbappend4
-rw-r--r--recipes-support/dnsmasq/files/init.patch12
2 files changed, 16 insertions, 0 deletions
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/*"
+