diff options
author | tron <tron> | 1999-07-26 20:56:23 +0000 |
---|---|---|
committer | tron <tron> | 1999-07-26 20:56:23 +0000 |
commit | 615bb72f20d0e36f71af641a6174d8234bcf37c5 (patch) | |
tree | 6d2274e238be8962dfe55c84c1a99a6d06caee48 | |
parent | e06f6b025d0becc94050910db1e268e28ad0391a (diff) | |
download | pkgsrc-615bb72f20d0e36f71af641a6174d8234bcf37c5.tar.gz |
Create configuration files in "${PREFIX}/etc/nntp" automatically so that
newsreaders like "nn" or "trn" can use them.
-rw-r--r-- | news/inn/Makefile | 4 | ||||
-rw-r--r-- | news/inn/files/innd.sh | 17 | ||||
-rw-r--r-- | news/inn/pkg/PLIST | 4 |
3 files changed, 21 insertions, 4 deletions
diff --git a/news/inn/Makefile b/news/inn/Makefile index a9b2a3b5c02..88d35165a88 100644 --- a/news/inn/Makefile +++ b/news/inn/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.6 1999/07/21 22:29:36 tron Exp $ +# $NetBSD: Makefile,v 1.7 1999/07/26 20:56:23 tron Exp $ DISTNAME= inn-2.2 CATEGORIES= news @@ -41,7 +41,7 @@ post-build: .endfor pre-install: - ${MKDIR} ${INN_DATA_DIR} + ${MKDIR} ${INN_DATA_DIR} ${PREFIX}/etc/nntp post-install: ${MKDIR} ${PREFIX}/share/examples/inn diff --git a/news/inn/files/innd.sh b/news/inn/files/innd.sh index f832407ecf6..4ee4fed891e 100644 --- a/news/inn/files/innd.sh +++ b/news/inn/files/innd.sh @@ -1,10 +1,25 @@ #!/bin/sh # -# $NetBSD: innd.sh,v 1.4 1999/07/24 17:38:14 tron Exp $ +# $NetBSD: innd.sh,v 1.5 1999/07/26 20:56:24 tron Exp $ # if [ -x @@PREFIX@@/bin/rc.news -a -s @@INN_DATA_DIR@@/db/active ]; then su news -c @@PREFIX@@/bin/rc.news >/dev/null + + if [ ! -f @@PREFIX@@/etc/nntp/server ] + then + hostname >@@PREFIX@@/etc/nntp/server + fi + + if [ ! -f @@PREFIX@@/etc/nntp/domainname ] + then + set - X `grep -w ^fromhost: @@INN_DATA_DIR@@/etc/inn.conf | head -1` + if [ $# -eq 3 ] + then + echo $3 >@@PREFIX@@/etc/nntp/domainname + fi + fi + echo -n ' innd' fi exit 0 diff --git a/news/inn/pkg/PLIST b/news/inn/pkg/PLIST index c868358eb13..9e168020d05 100644 --- a/news/inn/pkg/PLIST +++ b/news/inn/pkg/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.3 1999/07/21 20:38:56 tron Exp $ +@comment $NetBSD: PLIST,v 1.4 1999/07/26 20:56:24 tron Exp $ bin/actived bin/actmerge bin/actsync @@ -96,6 +96,8 @@ bin/startinnfeed bin/tally.control bin/writelog etc/rc.d/innd.sh +@exec mkdir -p %D/etc/nntp +@unexec rm -rf %D/etc/nntp lib/docheckgroups lib/innreport_inn.pm lib/innshellvars |