Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 170748 Details for
Bug 245593
app-text/dictd-1.10.11-r3 is always reported to fail to start and uses no pid file
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
init script fixed by using a pid file
dictd (text/plain), 1.98 KB, created by
Erik Hahn
on 2008-11-04 21:50:59 UTC
(
hide
)
Description:
init script fixed by using a pid file
Filename:
MIME Type:
Creator:
Erik Hahn
Created:
2008-11-04 21:50:59 UTC
Size:
1.98 KB
patch
obsolete
>#!/sbin/runscript ># Copyright 1999-2004 Gentoo Foundation ># Distributed under the terms of the GNU General Public License v2 ># $Header: /var/cvsroot/gentoo-x86/app-text/dictd/files/1.10.11/dictd.initd,v 1.2 2008/09/14 08:59:45 pva Exp $ > >prepconfig() { > local TMPCONF INDEXFILES CNT DNAME DICT > if [ ! -e "${DICTDCONF}" ]; then > eerror "Config file ${DICTDCONF} not found." > return 1 > fi > > # if no dictionaries, skip startup. > # The new way of doing this is to scan /usr/lib/dict and tweek the conf > einfo "Scanning for dictionaries..." > if [ ! -d "${DLIBDIR}" ]; then > eerror "${DLIBDIR} doesn't exist, no dictionaries found." > return 1 > fi > pushd ${DLIBDIR} >/dev/null > INDEXFILES=$(ls *.index) > if [ -z "${INDEXFILES}" ]; then > eerror "No dictionaries found at ${DLIBDIR}." > eerror "Please, emerge at least one of app-dicts/dictd-* dictionaries." > return 1 > fi > > TMPCONF=$(mktemp -t dictd.conf.XXXXXXXXXX) > cat ${DICTDCONF} | sed -e '/^#LASTLINE/,$d' > ${TMPCONF} > echo "#LASTLINE" >> ${TMPCONF} > > CNT=0 > for i in ${INDEXFILES}; do > DNAME=$(echo $i | sed -e 's/[.]index$//') > #two possible names for a matching dictionary, check which is there. > if [ -f ${DNAME}.dict.dz ]; then > DICT=${DNAME}.dict.dz > elif [ -f ${DNAME}.dict ];then > DICT=${DNAME}.dict > else > ewarn "Index $i has no matching dictionaray..." > fi > > #ok, go an index, and a dixtionary, append. > echo "database ${DNAME} { data \"${DLIBDIR}/${DICT}\"" >> ${TMPCONF} > echo " index \"${DLIBDIR}/$i\" }" >> ${TMPCONF} > > CNT=$(expr ${CNT} + 1) > done > popd >/dev/null > mv "${TMPCONF}" "${DICTDCONF}" > chown 0:dictd "${DICTDCONF}" > chmod g+r "${DICTDCONF}" > einfo "Done, ${CNT} dictionaries found." >} > >depend() { > need localmount >} > >start() { > prepconfig || return 1 > ebegin "Starting dictd" > start-stop-daemon --start --quiet -p ${DICTD_PID} --exec /usr/sbin/dictd -- --pid-file ${DICTD_PID} ${DICTD_OPTS} > eend $? >} > >stop() { > ebegin "Stopping dictd" > start-stop-daemon --stop --quiet -p ${DICTD_PID} --exec /usr/sbin/dictd > eend $? >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 245593
:
170748
|
170749
|
170790
|
170792
|
170794
|
170795