aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/nss-myhostname
diff options
context:
space:
mode:
authorKoen Kooi <koen@dominion.thruhere.net>2014-08-20 15:28:50 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-08-23 09:26:10 +0100
commit7b0137c823931a236583b509a3ee5fdc0e957387 (patch)
treebbdf3db7f0e0866c02a6f37cb5fcbfbd5b7ffa97 /meta/recipes-support/nss-myhostname
parent06d529ce79c1a3a32d9885390e47f77405246cc3 (diff)
downloadopenembedded-core-contrib-7b0137c823931a236583b509a3ee5fdc0e957387.tar.gz
nss-myhostname: fix postinst/prerm scripts
${D} is expanded by bitbake which means the postinst looks like this: sed -e '/^hosts:/s/\s*\<myhostname\>//' \ -e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 myhostname \3\4\5/' \ -i /build/scratch/angstrom-v2014.12/build/tmp-angstrom_next-eglibc/work/armv5te-angstrom-linux-gnueabi/systemd/1_216+gitAUTOINC+5d0ae62c66-r0/image/etc/nsswitch.conf Change ${D} to $D to stop it from being expanded by bitbake. (From OE-Core rev: 37fd211e598b2342533b00d89c9efcd151c529ae) Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support/nss-myhostname')
-rw-r--r--meta/recipes-support/nss-myhostname/nss-myhostname_0.3.bb4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/recipes-support/nss-myhostname/nss-myhostname_0.3.bb b/meta/recipes-support/nss-myhostname/nss-myhostname_0.3.bb
index d8ec863954..1237602553 100644
--- a/meta/recipes-support/nss-myhostname/nss-myhostname_0.3.bb
+++ b/meta/recipes-support/nss-myhostname/nss-myhostname_0.3.bb
@@ -16,11 +16,11 @@ inherit autotools
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
}