summaryrefslogtreecommitdiff
path: root/news/inn/patches/patch-af
blob: 26ef8673314975024209f6a3aa2b76d763f3d849 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
$NetBSD: patch-af,v 1.3 1999/07/18 23:36:55 tron Exp $

--- samples/sendbatch.in.orig	Thu Sep 17 08:15:02 1998
+++ samples/sendbatch.in	Mon Jul 19 01:23:35 1999
@@ -12,7 +12,7 @@
 COMP=
 COMPFLAGS=
 # Use the COMPRESS variable as it is in innshellvars
-# COMPRESS=/usr/ucb/compress
+COMPRESS=/usr/bin/compress
 ECHO=
 ##  Not a config param since this is the remote rnews.
 RNEWS=rnews
@@ -37,6 +37,10 @@
 	DEFBYTES=`expr "${SITE}" : '-s\(.*\)'`
 	continue
 	;;
+    -t*)
+	TRANSHOST=`expr "${SITE}" : '-t\(.*\)'`
+	continue
+	;;
     -m*)
 	BYTESQUEUED=`expr "${SITE}" : '-m\(.*\)'`
 	continue
@@ -75,6 +79,16 @@
 	ECHO="echo '#! cunbatch'"
 	continue
 	;;
+    -cg)
+	COMP="; exec gzip -9"
+	ECHO="echo '#! cunbatch'"
+	continue
+	;;
+    -g)
+	COMP="; exec gzip -9"
+	ECHO="echo '#! gunbatch'"
+	continue
+	;;
     +c)
 	COMP=''
 	C7=''
@@ -160,12 +174,20 @@
 	fi
 #    fi
 
+     if [ ${TRANSHOST-none} != none ]; then
+       SITE_SPOOLDIR=${UUSPOOL}/${TRANSHOST}
+       UUCPPATH=${TRANSHOST}!${SITE}
+     else
+       UUCPPATH=${SITE}
+       SITE_SPOOLDIR=${UUSPOOL}/${SITE}
+    fi
+
     ##  Check the host's queue size?
     QUEUE=0
     if [ -n "${BYTESQUEUED}" ] ; then
-	if [ -d ${UUSPOOL}/${SITE} ] ; then
+	if [ -d ${SITE_SPOOLDIR} ] ; then
 	    # Get queue size from directory size
-	    QUEUE=`du -s "${UUSPOOL}/${SITE}" \
+	    QUEUE=`du -s "${SITE_SPOOLDIR}" \
 		    | ${AWK} '{ printf("%s000\n", $1); }'`
 
 	else
@@ -199,9 +221,9 @@
     if [ -f ${SITE}.cmd ] ; then
 	UUXCOM="`cat ${SITE}.cmd`"
     elif [ -n "${ECHO}" -o -n "${COMP}" ]; then
-	UUXCOM="( ${ECHO} ${COMP} ) | ${UUX} - ${UUXFLAGS} ${SITE}!${RNEWS}"
+	UUXCOM="( ${ECHO} ${COMP} ) | ${UUX} - ${UUXFLAGS} ${UUCPPATH}!${RNEWS}"
     else
-	UUXCOM="${UUX} - ${UUXFLAGS} ${SITE}!${RNEWS}"
+	UUXCOM="${UUX} - ${UUXFLAGS} ${UUCPPATH}!${RNEWS}"
     fi
 
     ## Create batches.