summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonny Davies <woodchip@gentoo.org>2001-10-19 04:06:50 +0000
committerDonny Davies <woodchip@gentoo.org>2001-10-19 04:06:50 +0000
commit15ea3d82f03a8ea4d13b7c340b55abcdfc0d79d1 (patch)
tree3e594fdc78a60570fe904918bd2425d24c1d0781 /app-text/dictd/files
parentncurses updates, little things (diff)
downloadgentoo-2-15ea3d82f03a8ea4d13b7c340b55abcdfc0d79d1.tar.gz
gentoo-2-15ea3d82f03a8ea4d13b7c340b55abcdfc0d79d1.tar.bz2
gentoo-2-15ea3d82f03a8ea4d13b7c340b55abcdfc0d79d1.zip
small fixos. change all exit 1s to return 1s
Diffstat (limited to 'app-text/dictd/files')
-rw-r--r--app-text/dictd/files/1.5.5-r6/dictd.rc627
1 files changed, 12 insertions, 15 deletions
diff --git a/app-text/dictd/files/1.5.5-r6/dictd.rc6 b/app-text/dictd/files/1.5.5-r6/dictd.rc6
index 3ff4a2973f32..0c60661bb903 100644
--- a/app-text/dictd/files/1.5.5-r6/dictd.rc6
+++ b/app-text/dictd/files/1.5.5-r6/dictd.rc6
@@ -1,31 +1,29 @@
#!/sbin/runscript
-EXEC=/usr/sbin/dictd
EARGS="-s "
DICTDCONF=/etc/dict/dictd.conf
+DLIBDIR=/usr/lib/dict
TMPCONF=/etc/dict/dictd.conf.$$
prepconfig() {
if [ ! -e ${DICTDCONF} ]
then
eerror "dictd not started. Config file not found."
- exit 1
+ return 1
fi
# if no dictionaries, skip startup.
# The new way of doing this is to scan /usr/lib/dict and tweek the conf
- DLIBDIR=/usr/lib/dict
-
einfo "Scanning for dictionaries..."
if [ ! -d "${DLIBDIR}" ]; then
eerror "${DLIBDIR} doesn't exist, no dictionaries found."
- exit 1
+ return 1
fi
pushd ${DLIBDIR} >/dev/null
INDEXFILES=`ls *.index`
if [ -z "$INDEXFILES" ]; then
eerror "No dictionaries installed."
- exit 1
+ return 1
fi
cat $DICTDCONF | sed -e '/^#LASTLINE/,$d' > $TMPCONF
@@ -56,19 +54,18 @@ prepconfig() {
}
depend() {
- need localmount
+ need localmount
}
start() {
- ebegin "Starting ${SERVICE}"
- prepconfig
- start-stop-daemon --start --quiet --exec $EXEC -- $EARGS
- eend $?
+ ebegin "Starting dictd"
+ prepconfig || return 1
+ start-stop-daemon --start --quiet --exec /usr/sbin/dictd -- $EARGS
+ eend $?
}
stop() {
- ebegin "Stopping ${SERVICE}"
- start-stop-daemon --stop --quiet --name ${SERVICE} --exec $EXEC
- eend $?
+ ebegin "Stopping dictd"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/dictd
+ eend $?
}
-