Xref: utzoo news.software.b:2421 news.sysadmin:2530 comp.sources.d:3810 Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!vsi1!lmb From: lmb@vicom.com (Larry Blair) Newsgroups: news.software.b,news.sysadmin,comp.sources.d Subject: How to multicast under C News Message-ID: <1989Jul2.055744.20442@vicom.com> Date: 2 Jul 89 05:57:44 GMT Organization: VICOM Systems Inc., San Jose, CA Lines: 53 We have a number of leaf sites that take identical feeds from us. As a result, we only create one batch and then send it to each of the leaves. For C News, I created a new batch handler, which I called viauuxl. The enclosed script uses uux -l so that only a single, multiply linked copy of the batch is used. If your uux does not support -l, you'll need to modify appropriately. Even if you don't have -l, the multicasting method is a big win. Also note that the script uses Mail -s. Change if you system doesn't support Mail or -s. #! /bin/sh # Transmit batch to all the sites listed in $NEWSCTL/lbatchsites. # . ${NEWSCONFIG-/usr/lib/news/bin/config} BATCHNAME=/usr/spool/uucp/newsbatchs/$1.`getdate now` cat - > $BATCHNAME if [ $? -ne 0 ] then Mail -s "Could not write $BATCHNAME" usenet << EOF An attempt to save a leafbatch to $BATCHNAME failed. Possible causes may be insuffucient space on the filesystem or improper permissions. The batch was discarded. EOF rm -f $BATCHNAME exit 1 fi GRADE=-gz for site in `cat $NEWSCTL/lbatchsites` do case $site in -g*) GRADE=$site; continue;; esac uux -r -l -n $GRADE $site!rnews \< !$BATCHNAME error=$? if [ $? -ne 0 ] then Mail -s "Status $error on $BATCHNAME for $site" usenet << EOF Uux Failed for $site. Leafbatch script continued for other hosts. EOF exit fi done rm -f $BATCHNAME exit 0 -- Larry Blair ames!vsi1!lmb lmb@vicom.com