Gentoo Archives: gentoo-commits

From: "Peter Volkov (pva)" <pva@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-text/dictd/files/1.10.11: dictd.initd
Date: Sun, 01 Aug 2010 11:05:04
Message-Id: 20100801104821.9740B2CF3A@corvid.gentoo.org
1 pva 10/08/01 10:48:21
2
3 Modified: dictd.initd
4 Log:
5 Do not use non-posix pushd/popd inside init script, bug #330679, thank ferret for report.
6 (Portage version: 2.1.8.3/cvs/Linux x86_64)
7
8 Revision Changes Path
9 1.4 app-text/dictd/files/1.10.11/dictd.initd
10
11 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/dictd/files/1.10.11/dictd.initd?rev=1.4&view=markup
12 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/dictd/files/1.10.11/dictd.initd?rev=1.4&content-type=text/plain
13 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/dictd/files/1.10.11/dictd.initd?r1=1.3&r2=1.4
14
15 Index: dictd.initd
16 ===================================================================
17 RCS file: /var/cvsroot/gentoo-x86/app-text/dictd/files/1.10.11/dictd.initd,v
18 retrieving revision 1.3
19 retrieving revision 1.4
20 diff -u -r1.3 -r1.4
21 --- dictd.initd 8 Nov 2008 18:36:21 -0000 1.3
22 +++ dictd.initd 1 Aug 2010 10:48:21 -0000 1.4
23 @@ -1,12 +1,12 @@
24 #!/sbin/runscript
25 # Copyright 1999-2004 Gentoo Foundation
26 # Distributed under the terms of the GNU General Public License v2
27 -# $Header: /var/cvsroot/gentoo-x86/app-text/dictd/files/1.10.11/dictd.initd,v 1.3 2008/11/08 18:36:21 pva Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/app-text/dictd/files/1.10.11/dictd.initd,v 1.4 2010/08/01 10:48:21 pva Exp $
29
30 DICTD_PID="/var/run/dictd.pid"
31
32 prepconfig() {
33 - local TMPCONF INDEXFILES CNT DNAME DICT
34 + local TMPCONF INDEXFILES CNT DNAME DICT SAVEDIR
35 if [ ! -e "${DICTDCONF}" ]; then
36 eerror "Config file ${DICTDCONF} not found."
37 return 1
38 @@ -19,7 +19,9 @@
39 eerror "${DLIBDIR} doesn't exist, no dictionaries found."
40 return 1
41 fi
42 - pushd ${DLIBDIR} >/dev/null
43 +
44 + SAVEDIR=${PWD}
45 + cd "${DLIBDIR}"
46 INDEXFILES=$(ls *.index)
47 if [ -z "${INDEXFILES}" ]; then
48 eerror "No dictionaries found at ${DLIBDIR}."
49 @@ -49,7 +51,8 @@
50
51 CNT=$(expr ${CNT} + 1)
52 done
53 - popd >/dev/null
54 +
55 + cd "${SAVEDIR}"
56 mv "${TMPCONF}" "${DICTDCONF}"
57 chown 0:dictd "${DICTDCONF}"
58 chmod g+r "${DICTDCONF}"