aboutsummaryrefslogtreecommitdiff
path: root/meta-linaro-integration
diff options
context:
space:
mode:
authorKoen Kooi <koen.kooi@linaro.org>2015-02-22 08:52:39 +0000
committerLinaro Code Review <review@review.linaro.org>2015-02-22 08:52:39 +0000
commit429cdb5de2996145fd545b7b9a4c0dd0b103885d (patch)
treee9bfd11e40c06e368283928dd1b1df2b8c09a380 /meta-linaro-integration
parent193b9d8f785e1f6911b1f5f22b9e7f9e9f0023da (diff)
parent31f6da15bf92016cb2557146cf50cdfc68365d44 (diff)
Merge "nss-myhostname: rebase recipe on oe-core/master"
Diffstat (limited to 'meta-linaro-integration')
-rw-r--r--meta-linaro-integration/recipes-overlayed/nss-myhostname/nss-myhostname_0.3.bb9
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
}