File:  [CSRG BSD Unix] / 43BSD / contrib / news / misc / restore.active
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:54 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD43
BSD 4.3

: recreate the active file from readers .newsrc files
: and from the existing articles

lib=${1-/usr/lib/news}
tmp=/tmp/$$
: Find the highest numbered articles from the .newsrcs
cat `sed 's/[^:]*:[^:]*:[^:]*:[^:]*:[^:]*://
s/:.*//' /etc/passwd | sort -u | sed 's;$;/.newsrc;' ` 2>/dev/null  | 
sed '/:/!d
s/:.*[,-]/ /
s/: */ /'  >$tmp
: in case there are groups no-one reads, look in the list of newsgroups
sed 's/[ 	].*/ 1/' $lib/newsgroups >>$tmp
sort  +0 -1 +1nr  $tmp | sort -m +0u -1 | sed 's/$/ 00001 y/
/^fa/s/y$/n/' >$lib/active
: finally, scan the spool directory and fix up the active file.
$lib/expire -u
rm -f $tmp

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.