summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/libnss-mdns
diff options
context:
space:
mode:
authorDan McGregor <dan.mcgregor@usask.ca>2018-05-16 10:54:58 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-05-22 13:13:33 +0100
commit7897fb35a3420c2555ab59dfa438217ada4a9784 (patch)
tree66d322499e8ac8c3b3f0792e9bfa8c30f516cacf /meta/recipes-connectivity/libnss-mdns
parent669a89f377f7e41731b6920c71231269aebcb229 (diff)
downloadpoky-7897fb35a3420c2555ab59dfa438217ada4a9784.tar.gz
libnss-mdns: fix postinst and postrm
Don't blindly add mdns_minimal, instead check for existing mdns_minimal instances. Fixes continuously appending mdns settings to nssswitch.conf when upgrading. (From OE-Core rev: 9da097b0de6425464ebd3f0539b7495b11d139b5) Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/libnss-mdns')
-rw-r--r--meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb15
1 files changed, 9 insertions, 6 deletions
diff --git a/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb b/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb
index 8d2feec769..5be5e4fa32 100644
--- a/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb
+++ b/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb
@@ -28,13 +28,16 @@ DEBIANNAME_${PN} = "libnss-mdns"
28RDEPENDS_${PN} = "avahi-daemon" 28RDEPENDS_${PN} = "avahi-daemon"
29 29
30pkg_postinst_${PN} () { 30pkg_postinst_${PN} () {
31 sed -e '/^hosts:/s/\s*\<mdns\>//' \ 31 sed '
32 -e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 mdns4_minimal [NOTFOUND=return]\3\4 mdns\5/' \ 32 /^hosts:/ !b
33 -i $D${sysconfdir}/nsswitch.conf 33 /\<mdns\(4\|6\)\?\(_minimal\)\?\>/ b
34 s/\([[:blank:]]\+\)dns\>/\1mdns4_minimal [NOTFOUND=return] dns/g
35 ' -i $D${sysconfdir}/nsswitch.conf
34} 36}
35 37
36pkg_prerm_${PN} () { 38pkg_prerm_${PN} () {
37 sed -e '/^hosts:/s/\s*\<mdns\>//' \ 39 sed '
38 -e '/^hosts:/s/\s*mdns4_minimal\s\+\[NOTFOUND=return\]//' \ 40 /^hosts:/ !b
39 -i $D${sysconfdir}/nsswitch.conf 41 s/[[:blank:]]\+mdns\(4\|6\)\?\(_minimal\( \[NOTFOUND=return\]\)\?\)\?//g
42 ' -i $D${sysconfdir}/nsswitch.conf
40} 43}