[oe-commits] Robert P. J. Day : nss*: Replace hardcoded "/etc" with "${sysconfdir}"

git at git.openembedded.org git at git.openembedded.org
Wed Aug 6 09:03:51 UTC 2014


Module: openembedded-core.git
Branch: master-next
Commit: 1c44e057c66fe20d491fcb3ae45defe0a300b256
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=1c44e057c66fe20d491fcb3ae45defe0a300b256

Author: Robert P. J. Day <rpjday at crashcourse.ca>
Date:   Sat Aug  2 06:38:49 2014 -0400

nss*: Replace hardcoded "/etc" with "${sysconfdir}"

Signed-off-by: Robert P. J. Day <rpjday at crashcourse.ca>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/recipes-support/nss-myhostname/nss-myhostname_0.3.bb | 4 ++--
 meta/recipes-support/nss/nss.inc                          | 6 +++---
 2 files changed, 5 insertions(+), 5 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 540f223..d8ec863 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/etc/nsswitch.conf
+		-i ${D}${sysconfdir}/nsswitch.conf
 }
 
 pkg_prerm_${PN} () {
 	sed -e '/^hosts:/s/\s*\<myhostname\>//' \
 		-e '/^hosts:/s/\s*myhostname//' \
-		-i $D/etc/nsswitch.conf
+		-i ${D}${sysconfdir}/nsswitch.conf
 }
diff --git a/meta/recipes-support/nss/nss.inc b/meta/recipes-support/nss/nss.inc
index ce7d4a4..69f98b5 100644
--- a/meta/recipes-support/nss/nss.inc
+++ b/meta/recipes-support/nss/nss.inc
@@ -169,10 +169,10 @@ do_install_append_class-target() {
     sed -i s:OEINCDIR:${includedir}/nss3:g ${D}${libdir}/pkgconfig/nss.pc
 
     # Create a blank certificate
-    mkdir -p ${D}/etc/pki/nssdb/
+    mkdir -p ${D}${sysconfdir}/pki/nssdb/
     touch ./empty_password
-    certutil -N -d ${D}/etc/pki/nssdb/ -f ./empty_password
-    chmod 644 ${D}/etc/pki/nssdb/*.db
+    certutil -N -d ${D}${sysconfdir}/pki/nssdb/ -f ./empty_password
+    chmod 644 ${D}${sysconfdir}/pki/nssdb/*.db
     rm ./empty_password
 }
 



More information about the Openembedded-commits mailing list