diff options
-rw-r--r-- | meta-linaro-integration/recipes-overlayed/nss-myhostname/nss-myhostname_0.3.bb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/meta-linaro-integration/recipes-overlayed/nss-myhostname/nss-myhostname_0.3.bb b/meta-linaro-integration/recipes-overlayed/nss-myhostname/nss-myhostname_0.3.bb index b9ddeaf6..2483a15b 100644 --- a/meta-linaro-integration/recipes-overlayed/nss-myhostname/nss-myhostname_0.3.bb +++ b/meta-linaro-integration/recipes-overlayed/nss-myhostname/nss-myhostname_0.3.bb @@ -11,19 +11,22 @@ SRC_URI = "http://0pointer.de/lennart/projects/nss-myhostname/nss-myhostname-${P SRC_URI[md5sum] = "d4ab9ac36c053ab8fb836db1cbd4a48f" SRC_URI[sha256sum] = "2ba744ea8d578d1c57c85884e94a3042ee17843a5294434d3a7f6c4d67e7caf2" -inherit autotools +inherit autotools distro_features_check # /etc/nsswitch.conf needs to be present RDEPENDS_${PN} = "base-files" +# The systemd has its own copy of nss-myhostname +CONFLICT_DISTRO_FEATURES = "systemd" + pkg_postinst_${PN} () { sed -e '/^hosts:/s/\s*\<myhostname\>//' \ -e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 myhostname \3\4\5/' \ - -i ${D}${sysconfdir}/nsswitch.conf + -i $D${sysconfdir}/nsswitch.conf } pkg_prerm_${PN} () { sed -e '/^hosts:/s/\s*\<myhostname\>//' \ -e '/^hosts:/s/\s*myhostname//' \ - -i ${D}${sysconfdir}/nsswitch.conf + -i $D${sysconfdir}/nsswitch.conf } |