summaryrefslogtreecommitdiff
path: root/news/inn/patches/patch-af
blob: 5dc9e9aabe9f82f0abc48e79b96dfc119081cd05 (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
$NetBSD: patch-af,v 1.5 2002/07/06 15:04:58 tron Exp $

--- backends/sendbatch.in.orig	Thu Sep 17 08:15:02 1998
+++ backends/sendbatch.in	Mon Jul 19 01:23:35 1999
@@ -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.