summaryrefslogtreecommitdiff
path: root/net/dictd
diff options
context:
space:
mode:
authorClive Lin <clive@FreeBSD.org>2001-01-28 21:23:04 +0000
committerClive Lin <clive@FreeBSD.org>2001-01-28 21:23:04 +0000
commitf0ad3af7447043580c8e5ecae2148c8ebd8dffea (patch)
tree963bce67d84bc0482a0d498db936876e811a9d3c /net/dictd
parentoops new file added. (diff)
o Fix pkg-comment, this port only contains dict server
o Fix pkg-message, dict client is right at textproc/dict o Add missing pkg-plist entry o Really destroy T_USER conflicts. *SIGH* o Fix dictd.sh startup script. Dictd itself won't generate any pid file. Thus I use my own trick. pkg-* reported by: "Donald J . Maddox" <dmaddox@sc.rr.com>
Notes
Notes: svn path=/head/; revision=37699
Diffstat (limited to 'net/dictd')
-rw-r--r--net/dictd/Makefile2
-rw-r--r--net/dictd/files/dictd.sh22
-rw-r--r--net/dictd/pkg-comment2
-rw-r--r--net/dictd/pkg-message4
-rw-r--r--net/dictd/pkg-plist1
5 files changed, 19 insertions, 12 deletions
diff --git a/net/dictd/Makefile b/net/dictd/Makefile
index de4d96420885..ff9c4257f7b3 100644
--- a/net/dictd/Makefile
+++ b/net/dictd/Makefile
@@ -35,7 +35,7 @@ post-patch:
@${PERL} -pi -e "s|/usr|${PREFIX}|g" ${WRKSRC}/$i
.endfor
@${PERL} -pi -e "s|%%CFLAGS%%|${CFLAGS}|g" ${WRKSRC}/zlib/Makefile
- @${PERL} -pi -e "s|[\ \t]T_USER| T_USERNAME|g" ${WRKSRC}/servparse.*
+ @${PERL} -pi -e "s|[\ \t]T_USER| T_USERNAME|g" ${WRKSRC}/*.[chly]
post-install:
@${MKDIR} ${PREFIX}/share/${PORTNAME}
diff --git a/net/dictd/files/dictd.sh b/net/dictd/files/dictd.sh
index 3f0460b58963..6791440d512e 100644
--- a/net/dictd/files/dictd.sh
+++ b/net/dictd/files/dictd.sh
@@ -1,7 +1,14 @@
#!/bin/sh
-
# $FreeBSD$
+SOCKSTAT=/usr/bin/sockstat
+GREP=/usr/bin/grep
+AWK=/usr/bin/awk
+ECHO=/bin/echo
+CAT=/bin/cat
+KILL=/bin/kill
+RM=/bin/rm
+
DICTD=%%PREFIX%%/sbin/dictd
# DICTD_OPTIONS="-put -command_line -options -for -dictd -here"
@@ -12,10 +19,11 @@ DICTD_PID_FILE=/var/run/dictd.pid
case "$1" in
start)
if [ -x $DICTD ]; then
- echo "dictd starting."
+ ${ECHO} "dictd starting."
$DICTD $DICTD_OPTIONS
+ ${ECHO} `${SOCKSTAT} | ${GREP} dictd | ${AWK} '{print $3}'` > ${DICTD_PID_FILE}
else
- echo "dictd.sh: cannot find $DICTD or it's not executable"
+ ${ECHO} "dictd.sh: cannot find $DICTD or it's not executable"
fi
;;
@@ -23,12 +31,12 @@ case "$1" in
if [ ! -f $DICTD_PID_FILE ]; then
exit 0
fi
- dictdpid=`cat $DICTD_PID_FILE`
+ dictdpid=`${CAT} $DICTD_PID_FILE`
if [ "$dictdpid" -gt 0 ]; then
- echo "Stopping the dictd server."
- kill -15 $dictdpid 2>&1 > /dev/null
+ ${ECHO} "Stopping the dictd server."
+ ${KILL} -15 $dictdpid 2>&1 > /dev/null
fi
- rm -f $DICTD_PID_FILE
+ ${RM} -f $DICTD_PID_FILE
;;
*)
echo "Usage: dictd.sh { start | stop }"
diff --git a/net/dictd/pkg-comment b/net/dictd/pkg-comment
index 7fa46bfea75d..ddada704bd89 100644
--- a/net/dictd/pkg-comment
+++ b/net/dictd/pkg-comment
@@ -1 +1 @@
-Dict protocol (RFC 2229) client and server
+Dict protocol (RFC 2229) server
diff --git a/net/dictd/pkg-message b/net/dictd/pkg-message
index d1ab01d4cc3e..5d8f78b6e113 100644
--- a/net/dictd/pkg-message
+++ b/net/dictd/pkg-message
@@ -1,7 +1,5 @@
==================================================================
-dictd database can be found at ftp://ftp.dict.org/pub/dict
-
-example config can be found at %%PREFIX%%/share/dictd
+Dict client could be found within ports/textproc/dict.
==================================================================
diff --git a/net/dictd/pkg-plist b/net/dictd/pkg-plist
index d7c701c2a67e..7d02f0805995 100644
--- a/net/dictd/pkg-plist
+++ b/net/dictd/pkg-plist
@@ -6,4 +6,5 @@ share/dictd/example.site
share/dictd/example2.conf
share/dictd/example3.conf
etc/dictd.conf
+etc/rc.d/dictd.sh
@dirrm share/dictd