Change the ownership of /var/cache/bind to bind rather than root.

Signed-off-by: Joe Slater <[email protected]>
---
 meta/recipes-connectivity/bind/bind_9.10.2-P4.bb |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-connectivity/bind/bind_9.10.2-P4.bb 
b/meta/recipes-connectivity/bind/bind_9.10.2-P4.bb
index 19f87d7..b309b06 100644
--- a/meta/recipes-connectivity/bind/bind_9.10.2-P4.bb
+++ b/meta/recipes-connectivity/bind/bind_9.10.2-P4.bb
@@ -43,7 +43,7 @@ PACKAGECONFIG ?= ""
 PACKAGECONFIG[httpstats] = "--with-libxml2,--without-libxml2,libxml2"
 
 USERADD_PACKAGES = "${PN}"
-USERADD_PARAM_${PN} = "--system --home /var/cache/bind --no-create-home \
+USERADD_PARAM_${PN} = "--system --home ${localstatedir}/cache/bind 
--no-create-home \
                        --user-group bind"
 
 INITSCRIPT_NAME = "bind"
@@ -73,7 +73,7 @@ do_install_append() {
        rm "${D}${mandir}/man1/nslookup.1"
        rmdir "${D}${localstatedir}/run"
        rmdir --ignore-fail-on-non-empty "${D}${localstatedir}"
-       install -d "${D}${localstatedir}/cache/bind"
+       install -d -o bind "${D}${localstatedir}/cache/bind"
        install -d "${D}${sysconfdir}/bind"
        install -d "${D}${sysconfdir}/init.d"
        install -m 644 ${S}/conf/* "${D}${sysconfdir}/bind/"
@@ -81,7 +81,6 @@ do_install_append() {
        sed -i -e '1s,#!.*python,#! /usr/bin/env python,' 
${D}${sbindir}/dnssec-coverage ${D}${sbindir}/dnssec-checkds
 
        # Install systemd related files
-       install -d ${D}${localstatedir}/cache/bind
        install -d ${D}${sbindir}
        install -m 755 ${WORKDIR}/generate-rndc-key.sh ${D}${sbindir}
        install -d ${D}${systemd_unitdir}/system
-- 
1.7.9.5

-- 
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to