summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/bind/bind_9.9.5.bb
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2014-08-19 18:04:42 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-08-23 23:01:59 +0100
commit94c9b0285abd8ec0505ba06e3c23376171ce7480 (patch)
tree47be0ad74c97ebd63ab68b9b8be8d933f9d51835 /meta/recipes-connectivity/bind/bind_9.9.5.bb
parent73618768454a633c9966dff93611bf5693df0d99 (diff)
downloadpoky-94c9b0285abd8ec0505ba06e3c23376171ce7480.tar.gz
bind: refer ubuntu/redhat to add bind user/group
We refer what ubuntu/redhat did, gave bind a user/group Here is the example in ubuntu 14.04: $ ps -eo user,group,cmd | grep "named" ... bind bind /usr/sbin/named -u bind ... $vim bind9_1%3a9.9.5.dfsg-3_amd64.deb/postinst ... # lets give them a bind user/group in all cases. getent group bind >/dev/null 2>&1 || addgroup --system bind getent passwd bind >/dev/null 2>&1 || adduser --system --home /var/cache/bind --no-create-home \ --disabled-password --ingroup bind bind ... (From OE-Core rev: e37841faf746895f41627130623196c0bebe0740) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/bind/bind_9.9.5.bb')
-rw-r--r--meta/recipes-connectivity/bind/bind_9.9.5.bb10
1 files changed, 9 insertions, 1 deletions
diff --git a/meta/recipes-connectivity/bind/bind_9.9.5.bb b/meta/recipes-connectivity/bind/bind_9.9.5.bb
index de10eb8029..ebd38effa7 100644
--- a/meta/recipes-connectivity/bind/bind_9.9.5.bb
+++ b/meta/recipes-connectivity/bind/bind_9.9.5.bb
@@ -15,6 +15,7 @@ SRC_URI = "ftp://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.gz \
15 file://dont-test-on-host.patch \ 15 file://dont-test-on-host.patch \
16 file://generate-rndc-key.sh \ 16 file://generate-rndc-key.sh \
17 file://named.service \ 17 file://named.service \
18 file://bind9 \
18 file://init.d-add-support-for-read-only-rootfs.patch \ 19 file://init.d-add-support-for-read-only-rootfs.patch \
19 " 20 "
20 21
@@ -30,7 +31,11 @@ EXTRA_OECONF = " ${ENABLE_IPV6} --with-randomdev=/dev/random --disable-threads \
30 --with-openssl=${STAGING_LIBDIR}/.. --with-libxml2=${STAGING_LIBDIR}/.. \ 31 --with-openssl=${STAGING_LIBDIR}/.. --with-libxml2=${STAGING_LIBDIR}/.. \
31 --enable-exportlib --with-export-includedir=${includedir} --with-export-libdir=${libdir} \ 32 --enable-exportlib --with-export-includedir=${includedir} --with-export-libdir=${libdir} \
32 " 33 "
33inherit autotools-brokensep update-rc.d systemd 34inherit autotools-brokensep update-rc.d systemd useradd
35
36USERADD_PACKAGES = "${PN}"
37USERADD_PARAM_${PN} = "--system --home /var/cache/bind --no-create-home \
38 --user-group bind"
34 39
35INITSCRIPT_NAME = "bind" 40INITSCRIPT_NAME = "bind"
36INITSCRIPT_PARAMS = "defaults" 41INITSCRIPT_PARAMS = "defaults"
@@ -67,6 +72,9 @@ do_install_append() {
67 sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \ 72 sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
68 -e 's,@SBINDIR@,${sbindir},g' \ 73 -e 's,@SBINDIR@,${sbindir},g' \
69 ${D}${systemd_unitdir}/system/named.service 74 ${D}${systemd_unitdir}/system/named.service
75
76 install -d ${D}${sysconfdir}/default
77 install -m 0644 ${WORKDIR}/bind9 ${D}${sysconfdir}/default
70} 78}
71 79
72CONFFILES_${PN} = " \ 80CONFFILES_${PN} = " \