aboutsummaryrefslogtreecommitdiff
path: root/meta-linaro-integration
diff options
context:
space:
mode:
authorFathi Boudra <fathi.boudra@linaro.org>2015-02-22 10:49:22 +0200
committerFathi Boudra <fathi.boudra@linaro.org>2015-02-22 10:49:22 +0200
commit31f6da15bf92016cb2557146cf50cdfc68365d44 (patch)
tree8f7cc812d1d8e9c3009107c5468d4a1904d9bd1d /meta-linaro-integration
parent979fd1f0db964fbea36466c9ed0e58b80b66905c (diff)
nss-myhostname: rebase recipe on oe-core/master
Change-Id: I05ecc18350dc5680a387d333fd11222dcd3a4a6a Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
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
}