Gentoo Archives: gentoo-commits

From: "Christian Ruppert (idl0r)" <idl0r@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-dns/bind/files: named.init-r10
Date: Sun, 27 Feb 2011 22:27:59
Message-Id: 20110227222749.002F320054@flycatcher.gentoo.org
1 idl0r 11/02/27 22:27:48
2
3 Modified: named.init-r10
4 Log:
5 Remove 9.7.2_p3-r1. Copy /etc/localtime in the init script instead of emerge --config. Add openssl libgost support as of 9.8.0.
6
7 (Portage version: 2.2.0_alpha25/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.2 net-dns/bind/files/named.init-r10
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/bind/files/named.init-r10?rev=1.2&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/bind/files/named.init-r10?rev=1.2&content-type=text/plain
14 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/bind/files/named.init-r10?r1=1.1&r2=1.2
15
16 Index: named.init-r10
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/net-dns/bind/files/named.init-r10,v
19 retrieving revision 1.1
20 retrieving revision 1.2
21 diff -u -r1.1 -r1.2
22 --- named.init-r10 25 Feb 2011 12:42:11 -0000 1.1
23 +++ named.init-r10 27 Feb 2011 22:27:48 -0000 1.2
24 @@ -1,7 +1,7 @@
25 #!/sbin/runscript
26 # Copyright 1999-2011 Gentoo Foundation
27 # Distributed under the terms of the GNU General Public License v2
28 -# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/files/named.init-r10,v 1.1 2011/02/25 12:42:11 idl0r Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/files/named.init-r10,v 1.2 2011/02/27 22:27:48 idl0r Exp $
30
31 opts="start stop reload restart checkconfig checkzones"
32
33 @@ -13,6 +13,8 @@
34
35 NAMED_CONF=${CHROOT}/etc/bind/named.conf
36
37 +OPENSSL_LIBGOST=0
38 +
39 _mount() {
40 local from
41 local to
42 @@ -63,10 +65,16 @@
43 [ ! -d "${CHROOT}/var/run" ] || [ ! -d "${CHROOT}/var/log" ] && return 1
44 [ ! -d "${CHROOT}/etc/bind" ] || [ ! -d "${CHROOT}/var/bind" ] && return 1
45 [ ! -d "${CHROOT}/var/log/named" ] && return 1
46 - [ ! -e "${CHROOT}/etc/localtime" ] && return 1
47 [ ! -c "${CHROOT}/dev/null" ] || [ ! -c "${CHROOT}/dev/zero" ] && return 1
48 [ ! -c "${CHROOT}/dev/random" ] && [ ! -c "${CHROOT}/dev/urandom" ] && return 1
49 [ "${CHROOT_GEOIP:-0}" -eq 1 ] && [ ! -d "${CHROOT}/usr/share/GeoIP" ] && return 1
50 + if [ ${OPENSSL_LIBGOST:-0} -eq 1 ]; then
51 + if [ -d "/usr/lib64" ]; then
52 + [ ! -d "${CHROOT}/usr/lib64/engines" ] && return 1
53 + elif [ -d "/usr/lib" ]; then
54 + [ ! -d "${CHROOT}/usr/lib/engines" ] && return 1
55 + fi
56 + fi
57 fi
58
59 return 0
60 @@ -100,12 +108,28 @@
61
62 ebegin "Starting ${CHROOT:+chrooted }named"
63
64 - if [ -n "${CHROOT}" -a "${CHROOT_NOCHECK:-0}" -eq 0 ]; then
65 - check_chroot || {
66 - eend 1
67 - eerror "Your chroot dir ${CHROOT} is inconsistent, please run 'emerge --config net-dns/bind' first"
68 - return 1
69 - }
70 + if [ -n "${CHROOT}" ]; then
71 + if [ ${CHROOT_NOCHECK:-0} -eq 0 ]; then
72 + check_chroot || {
73 + eend 1
74 + eerror "Your chroot dir ${CHROOT} is inconsistent, please run 'emerge --config net-dns/bind' first"
75 + return 1
76 + }
77 + fi
78 +
79 + if [ ${OPENSSL_LIBGOST:-0} -eq 1 ]; then
80 + if [ ! -e /usr/lib/engines/libgost.so ]; then
81 + eend 1
82 + eerror "Couldn't find /usr/lib/engines/libgost.so but bind has been built with openssl and libgost support"
83 + return 1
84 + fi
85 + cp -Lp /usr/lib/engines/libgost.so "${CHROOT}/usr/lib/engines/libgost.so" || {
86 + eend 1
87 + eerror "Couldn't copy /usr/lib/engines/libgost.so into '${CHROOT}/usr/lib/engines/'"
88 + return 1
89 + }
90 + fi
91 + cp -Lp /etc/localtime "${CHROOT}/etc/localtime"
92
93 if [ "${CHROOT_NOMOUNT:-0}" -eq 0 ]; then
94 einfo "Mounting chroot dirs"