home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume17 / newgroup / part01 next >
Internet Message Format  |  1991-02-23  |  20KB

  1. From: news@iddth.dk (Nick Sandru)
  2. Newsgroups: comp.sources.misc
  3. Subject: v17i016:  Modified newgroup for c-news, Part01/01
  4. Message-ID: <1991Feb24.043221.20474@sparky.IMD.Sterling.COM>
  5. Date: 24 Feb 91 04:32:21 GMT
  6. Approved: kent@sparky.imd.sterling.com
  7. X-Checksum-Snefru: 8c5df677 75ed3da3 9c443f26 bfafbd9a
  8.  
  9. Submitted-by: Nick Sandru <news@iddth.dk>
  10. Posting-number: Volume 17, Issue 16
  11. Archive-name: newgroup/part01
  12.  
  13.     Modified 'newgroup' for c-news (patch level of 7-Sep-90)
  14.  
  15.             Nick Sandru, 1991
  16.  
  17. This is a modified 'newgroup' set, which allows the news administrator
  18. to decide whether he/she wants or not to create a new group required
  19. by a 'newgroup' control message. If the news administrator decides to
  20. create the group, all the articles which may have come since the
  21. 'newgroup' control has been received are collected from 'junk' and
  22. from the groups where they may have been cross-posted.
  23.  
  24. The modified 'newgroup' also prevents the unauthorized changing of
  25. a group's moderated or unmoderated status.
  26.  
  27. I made these changes after beeing tired of removing bogus newsgroups
  28. and restoring the status of some groups to moderated after some people
  29. (not authorized to do that) had changed it to unmoderated.
  30.  
  31. USAGE:
  32.  
  33. The modified 'newgroup' mails any received 'newgroup' controls to the
  34. news administrator (specified in 'config'), changing the 'Distribution:'
  35. to 'local' and the 'Sender:' to the news adminstrator's e-mail address.
  36. If you decide to create the group, save the message into a file and 
  37. do the following:
  38.  
  39. 1. Remove any lines inserted by the sendmail program before the
  40.    'Message-Id:' line;
  41. 2. Check the 'Sender:' line - the address MUST be identical to the
  42.    news admin's address sepcified in 'config' ($NEWSMASTER);
  43. 3. Feed the modified file into the news system by:
  44.  
  45.    inews -h file
  46.  
  47. The original 'Message-Id:' and 'Path:' lines are commented out by the
  48. 'newgroup' program before the message is mailed to the news admin.
  49.  
  50. The 'newgroup' is started by relaynews, collects the articles which are
  51. newer than the 'newgroup' control message, updates the 'history' file and
  52. rebuilds the 'history.*' database.
  53.  
  54. During the collection, no 'expire' can be performed - both the modified
  55. 'newgroup' and 'expire' copy the updated history file to a new file and
  56. rebuild the history database. 'newgroup' sets the 'LOCKexpire' lock. If
  57. an 'expire' is in progress, the 'newgroup' waits until it is finished.
  58.  
  59. The modified 'newgroup' calls the 'collng' (COLLect NewGroup) program to
  60. do the collection of the articles for the new group. This program reads
  61. the history file and, if the article is newer than the 'newgroup' control
  62. message, checks the '^Newsgroups:' line. If the new group is present,
  63. a link is made into the directory of the new group. At exit the 'collng'
  64. program returns the number of the last article, which is used for updating
  65. the 'active' file.
  66.  
  67. Install the modified 'newgroup' and get rid of problems!
  68.  
  69. Long Haired Nick.
  70.  
  71. ----CUT-HERE----CUT-HERE----
  72. #!/bin/sh
  73. # This is a shell archive (shar 3.32)
  74. # made 02/22/1991 21:11 UTC by news@ideal
  75. # Source directory /tank2/news/cnews
  76. #
  77. # existing files WILL be overwritten
  78. #
  79. # This shar contains:
  80. # length  mode       name
  81. # ------ ---------- ------------------------------------------
  82. #   5184 -rwxr-xr-x relay/ctl/newgroup
  83. #   4002 -rw-r--r-- relay/collng.c
  84. #    594 -rwxr-xr-x misc/newsboot
  85. #   3176 -rw-r--r-- relay/makefile.patch
  86. #
  87. if touch 2>&1 | fgrep 'amc' > /dev/null
  88.  then TOUCH=touch
  89.  else TOUCH=true
  90. fi
  91. # ============= relay/ctl/newgroup ==============
  92. if test ! -d 'relay'; then
  93.     echo "x - creating directory relay"
  94.     mkdir 'relay'
  95. fi
  96. if test ! -d 'relay/ctl'; then
  97.     echo "x - creating directory relay/ctl"
  98.     mkdir 'relay/ctl'
  99. fi
  100. if test -f ./relay/ctl/newgroup ; then
  101.     echo "renaming newgroup to newgroup.orig"
  102.     mv ./relay/ctl/newgroup ./relay/ctl/newgroup.orig
  103. fi
  104. echo "x - extracting relay/ctl/newgroup (Text)"
  105. sed 's/^X//' << 'SHAR_EOF' > relay/ctl/newgroup &&
  106. X#! /bin/sh
  107. X# newgroup group flag - create group (4-field version: B-2.10.3+ compatible)
  108. X#    subject to our sys file group pattern
  109. X#
  110. X# Modified by Nick Sandru (also known as Long Haired Nick)
  111. X#  Feb 22, 1991
  112. X#
  113. X# The new group is no more created automtically, but submitted to the
  114. X#  approval of the news administrator.
  115. X#
  116. X# Usage:
  117. X#  All newgroup controls are mailed to the news adminstrator.
  118. X#  If you want to run the newgroup, do the following:
  119. X#   - save the newgroup posting into a file (with headers);
  120. X#   - remove any lines inserted by the mailer before the Message-Id:;
  121. X#   - check the Sender: line and put the $NEWSMASTER there if
  122. X#     necessary;
  123. X#   - feed the file into the news system by
  124. X#
  125. X#    inews -h <file>
  126. X#
  127. X#   - the new group will be created and all the articles in the spool
  128. X#     containing the new group in the Newsgroups: line are linked into
  129. X#     the new group. The active file is updated.
  130. X#   - the collection is resumed after a crash by the newsboot script.
  131. X#
  132. X
  133. X# =()<. ${NEWSCONFIG-@<NEWSCONFIG>@}>()=
  134. X. ${NEWSCONFIG-/news/lib/bin/config}
  135. Xexport NEWSCTL NEWSBIN NEWSARTS
  136. XPATH=$NEWSCTL/bin:$NEWSBIN/relay:$NEWSBIN/expire:$NEWSBIN:$NEWSPATH
  137. XPATH=$NEWSBIN/ctl:$NEWSBIN/input:$NEWSBIN/inject:$PATH
  138. Xexport PATH
  139. Xumask $NEWSUMASK
  140. X
  141. Xhdr=/tmp/nc$$
  142. Xcontrol="$NEWSCTL/NGcontrol"
  143. Xinplock="$NEWSCTL/LOCKinput"
  144. Xnglock="$NEWSCTL/LOCKnewgroup"
  145. Xexplock="$NEWSCTL/LOCKexpire"
  146. Xltemp="$NEWSCTL/L.$$"
  147. Xecho $$ >$ltemp
  148. Xtrap "rm -f $hdr ${hdr}.a ${hdr}.m $ltemp ; exit 0" 0 1 2 15
  149. X
  150. Xif [ -f $control -a $# = 0 ]
  151. Xthen
  152. X    NEWGROUP=`grep '^Control: ' $control | cut -f3 -d\  -`
  153. X    FLAG=`grep '^Control: ' $control | cut -f4 -d\  -`
  154. X    cp $control ${hdr}.a
  155. X    rm -f $control
  156. X    BGFLAG=bg
  157. Xelse
  158. X    if [ $# = 0 ] ; then
  159. X        exit 0        # exit if no parameters
  160. X    fi
  161. X    NEWGROUP=$1
  162. X    FLAG=$2
  163. X    BGFLAG=$3
  164. X    if [ x$BGFLAG = xbg ] ; then
  165. X        cp $4 ${hdr}.a
  166. X        rm -f $4
  167. X    else
  168. X        cat >${hdr}.a
  169. X    fi
  170. Xfi
  171. X
  172. Xcanonhdr <${hdr}.a >$hdr
  173. X
  174. X# prepare the modified article to be posted to the news administrator
  175. Xsed 's/Path: />Path: /' $hdr | sed '/^Distribution: /d' | sed '/^Sender: /d' | sed 's/^Message-I/>Message-I/' > ${hdr}.m
  176. Xecho "Distribution: local" >> ${hdr}.m
  177. Xecho "Sender: $NEWSMASTER" >> ${hdr}.m
  178. Xecho >> ${hdr}.m
  179. Xsed '1,/^$/d' ${hdr}.a >> ${hdr}.m
  180. X
  181. X# unapproved ctl msg? then quit
  182. Xgrep -s '^Approved:' $hdr >/dev/null || { rm -f $hdr; exit 0; }
  183. X
  184. XSENDER="`grep '^Sender:' $hdr | sed 's/^[^:]*: *//' | cut -f1 -d\( `"
  185. Xcase "$SENDER" in
  186. X"")    SENDER="`grep '^From:' $hdr | sed 's/^[^:]*: *//' | cut -f1 -d\( `" ;;
  187. Xesac
  188. XSENDER=`echo $SENDER`
  189. X
  190. Xgreppat="^`echo $NEWGROUP | sed 's/\./\\\\./g' ` "
  191. Xif grep -s "$greppat" $NEWSCTL/active >/dev/null; then    # group exists?
  192. X    export SENDER
  193. X    if [ "$SENDER" = "$NEWSMASTER" ] ; then
  194. X        chamod "$NEWGROUP" "$FLAG"         # change moderated flag if needed
  195. X        exit
  196. X    else
  197. X        mail $NEWSMASTER < ${hdr}.m
  198. X        exit
  199. X    fi
  200. Xfi
  201. X
  202. Xme="`newshostname`"
  203. Xgngppat=`awk -f $NEWSBIN/relay/canonsys.awk $NEWSCTL/sys |
  204. X    egrep "^($me|ME):" |
  205. X    awk -F: '
  206. X{
  207. X    fields = split($FLAG, field2, "/")    # split ngs/dists
  208. X    print field2[1]            # print only ngs
  209. X    exit
  210. X}' `
  211. X
  212. Xif gngp -a "$gngppat" >/dev/null <<!
  213. X$NEWGROUP
  214. X!
  215. Xthen            # no group in active, but sys file likes it: make it
  216. X    if [ "$SENDER" = "$NEWSMASTER" ]
  217. X    then
  218. X        case "$FLAG" in
  219. X        moderated)    flag=m ;;
  220. X        *)        flag=y ;;
  221. X        esac
  222. X        # release the relaynews locks by starting 'newgroup'
  223. X        #  in the background
  224. X        if [ x$BGFLAG != xbg ]
  225. X        then
  226. X            cp ${hdr}.a $NEWSCTL/NG.$$
  227. X            newgroup $1 $flag bg $NEWSCTL/NG.$$ &
  228. X            exit 0
  229. X        fi
  230. X        rmlist="$hdr ${hdr}.a ${hdr}.m $ltemp"
  231. X        trap "rm -f $rmlist ; exit 0" 0 1 2 15
  232. X        # lock the database; wait first for running 'newgroup',
  233. X        #  'expire' and 'newsrun' to terminate
  234. X        for lock in $nglock $explock $inplock $NEWSCTL/LOCK
  235. X        do
  236. X            while [ `newslock $ltemp $lock ; echo $?` != 0 ]
  237. X            do
  238. X                sleep 30
  239. X            done
  240. X            rmlist="$rmlist $lock"
  241. X            trap "rm -f $rmlist ; exit 0" 0 1 2 15
  242. X        done
  243. X        # make a control file for resume after crash
  244. X        cp ${hdr}.a $control
  245. X        # make the directory since rn will bitch if it's missing
  246. X        mkpdir $NEWSARTS/`echo $NEWGROUP | tr . / `
  247. X        # get the date of the newgroup message (do not collect
  248. X        # articles older than that)
  249. X        DATE=`grep '^Date: ' $hdr | sed 's/Date: //'`
  250. X        DATE=`getdate "$DATE"`
  251. X        # collect articles for the new group from 'junk' and
  252. X        # from other groups
  253. X        collng $NEWGROUP $NEWSARTS $NEWSCTL/history $NEWSCTL/history.n $DATE
  254. X        exit_code=$?    # get the number of the last article
  255. X        zeroes=000000000
  256. X        nines=9
  257. X        while [ 1 ]    # add leading zeroes to the number
  258. X        do
  259. X            if [ `expr $exit_code` -le $nines ]
  260. X            then
  261. X                break
  262. X            else
  263. X                zeroes=`echo $zeroes | cut -c2- -`
  264. X                nines="${nines}9"
  265. X            fi
  266. X        done
  267. X        echo "$NEWGROUP ${zeroes}${exit_code} 0000000001 $flag" >>$NEWSCTL/active
  268. X        (echo "$NEWGROUP `getdate now` $SENDER" >>$NEWSCTL/active.times)  # rn hook
  269. X        if [ $exit_code = 0 ]
  270. X        then
  271. X            # no changes in history, delete the new file
  272. X            rm -f $NEWSCTL/history.n
  273. X        else
  274. X            mv $NEWSCTL/history $NEWSCTL/history.o
  275. X            mv $NEWSCTL/history.n $NEWSCTL/history
  276. X            mkdbm $NEWSCTL/history    # remake the history database
  277. X        fi
  278. X        rm -f $control        # remove the control file
  279. X        echo "newsgroup $NEWGROUP was created by $SENDER." | mail $NEWSMASTER
  280. X    else    # sender not the news adm - mail the article
  281. X        mail $NEWSMASTER < ${hdr}.m
  282. X    fi
  283. Xfi
  284. SHAR_EOF
  285. $TOUCH -am 0222220991 relay/ctl/newgroup &&
  286. chmod 0755 relay/ctl/newgroup ||
  287. echo "restore of relay/ctl/newgroup failed"
  288. set `wc -c relay/ctl/newgroup`;Wc_c=$1
  289. if test "$Wc_c" != "5184"; then
  290.     echo original size 5184, current size $Wc_c
  291. fi
  292. # ============= relay/collng.c ==============
  293. echo "x - extracting relay/collng.c (Text)"
  294. sed 's/^X//' << 'SHAR_EOF' > relay/collng.c &&
  295. X/*
  296. X * Collng - collect articles for a new group
  297. X *
  298. X * written by Nick Sandru (also known as Long Haired Nick)
  299. X * Feb 22, 1991
  300. X *
  301. X * Collng is executed from newgroup shell script in order to collect
  302. X *  articles for a new group. It reads the Newsgroups: line from every
  303. X *  article in the news spool, makes a link to the new group if necessary
  304. X *  and produces a new history file.
  305. X * Collng returns the number of the last article in the new group
  306. X *  which is used by the newgroup script for updating the active file
  307. X */
  308. X#include<stdio.h>
  309. X#include<string.h>
  310. X#define TRUE -1
  311. X#define FALSE 0
  312. X/*
  313. X * history file fields
  314. X */
  315. Xchar *mess_id;        /* message identifier */
  316. Xchar *times;        /* time stamps */
  317. Xchar *art_list;        /* list of articles */
  318. X/*
  319. X * buffers
  320. X */
  321. Xchar in_line[1024];    /* input buffer */
  322. Xchar out_line[1024];    /* output buffer */
  323. X/*
  324. X * stuff related to articles
  325. X */
  326. Xchar *ng_art;        /* group and article number */
  327. Xchar *ng_list;        /* Newsgroups: list */
  328. Xchar *newsgroup;    /* element in the newsgroups list */
  329. Xchar *newgroup;
  330. XFILE *article;
  331. XFILE *history;
  332. XFILE *history_n;
  333. Xchar *spool_dir;
  334. Xchar art_line[1024];
  335. Xchar art_name[1024];
  336. Xchar new_art_name[1024];
  337. Xint oldest_article;    /* don't collect articles older than that */
  338. Xint i;
  339. Xint file_flg;        /* file exists */
  340. Xint ignore;        /* ignore article flag */
  341. Xint art_nr;        /* article number */
  342. Xint art_time;        /* article time stamp */
  343. X
  344. Xmake_name(buffer, art)    /* make a file name (incl. path) from group/article */
  345. Xchar *buffer, *art;
  346. X{
  347. X  int i;
  348. X
  349. X  sprintf(buffer, "%s/%s", spool_dir, art);
  350. X  for (i = strlen(spool_dir); i < strlen(buffer); i++)
  351. X   if (buffer[i] == '.') buffer[i] = '/';
  352. X}
  353. X
  354. Xmain(argc, argv)
  355. Xint argc;
  356. Xchar *argv[];
  357. X{
  358. X  if ((history = fopen(argv[3],"r")) == NULL) exit(0);
  359. X  if ((history_n = fopen(argv[4],"w")) == NULL) exit(0);
  360. X  art_nr = 0;
  361. X  newgroup = argv[1];
  362. X  spool_dir = argv[2];
  363. X  sscanf(argv[5], "%d", &oldest_article);
  364. X  while(fgets(in_line, 1024, history) != NULL)
  365. X  {
  366. X   strtok(in_line, "\n");
  367. X   file_flg = FALSE;
  368. X   ignore = FALSE;
  369. X   mess_id = strtok(in_line, "\t");    /* pointer to the message-id */
  370. X   times = strtok(NULL, "\t");        /* pointer to time stamps */
  371. X   sscanf(times, "%d", &art_time);
  372. X   art_list = strtok(NULL, "\t");    /* pointer to the articles list */
  373. X   sprintf(out_line, "%s\t%s", mess_id, times);    /* copy to output buffer */
  374. X   ng_art = strtok(art_list, " ");    /* get the first article in list */
  375. X   if (ng_art != NULL) strcat(out_line, "\t");
  376. X   while(ng_art != NULL)
  377. X   {
  378. X    if (strncmp(ng_art, "control/", strlen("control/")) == 0) ignore = TRUE;
  379. X    if (oldest_article > art_time) ignore = TRUE;
  380. X    if ( ! ignore)
  381. X    {
  382. X     make_name(art_name, ng_art);
  383. X     if ( ! file_flg)
  384. X     {
  385. X      if ((article = fopen(art_name, "r")) != NULL)
  386. X       file_flg = TRUE;
  387. X      if (file_flg)            /* read the Newsgroups: line */
  388. X      {
  389. X       while (fgets(art_line, 1024, article) != NULL)
  390. X       {
  391. X    if (strncmp(art_line, "Newsgroups: ", strlen("Newsgroups: ")) == 0)
  392. X        {
  393. X     fclose(article);
  394. X     break;
  395. X    }
  396. X       }
  397. X      }
  398. X     }
  399. X    }
  400. X    strcat(out_line, ng_art);
  401. X    ng_art = strtok(NULL, " ");
  402. X    if (ng_art != NULL)
  403. X     strcat (out_line, " ");
  404. X   }
  405. X   strtok(art_line, "\n");
  406. X   ng_list = strtok(art_line, " ");
  407. X   ng_list = strtok(NULL, " ");
  408. X   newsgroup = strtok(ng_list, ",");
  409. X   while (newsgroup != NULL)        /* look for the new group in the */
  410. X   {                    /*  Newsgroups: line         */
  411. X    if (strcmp(newgroup, newsgroup) == 0)
  412. X    {
  413. X     strcat(out_line, " ");        /* new group present in Newsgroups: */
  414. X     art_nr++;                /*  put it in the history line and  */
  415. X     sprintf(in_line, "%s/%d", newgroup, art_nr);
  416. X     strcat(out_line, in_line);        /*  link it to the new directory    */
  417. X     make_name(new_art_name, in_line);
  418. X     i = link(art_name, new_art_name);
  419. X     break;
  420. X    }
  421. X    newsgroup = strtok(NULL, ",");
  422. X   }
  423. X   fprintf(history_n, "%s\n", out_line); /* write the updated line in history */
  424. X  }
  425. X  fclose(history);
  426. X  fclose(history_n);
  427. X  exit(art_nr);        /* return the last article nr. for updating the active file */
  428. X}
  429. SHAR_EOF
  430. $TOUCH -am 0222125791 relay/collng.c &&
  431. chmod 0644 relay/collng.c ||
  432. echo "restore of relay/collng.c failed"
  433. set `wc -c relay/collng.c`;Wc_c=$1
  434. if test "$Wc_c" != "4002"; then
  435.     echo original size 4002, current size $Wc_c
  436. fi
  437. # ============= misc/newsboot ==============
  438. if test ! -d 'misc'; then
  439.     echo "x - creating directory misc"
  440.     mkdir 'misc'
  441. fi
  442. if test -f ./misc/newsboot ; then
  443.     echo "renaming newsboot to newsboot.orig"
  444.     mv ./misc/newsboot ./misc/newsboot.orig
  445. fi
  446. echo "x - extracting misc/newsboot (Text)"
  447. sed 's/^X//' << 'SHAR_EOF' > misc/newsboot &&
  448. X#! /bin/sh
  449. X# newsboot - clean up on reboot
  450. X
  451. X# =()<. ${NEWSCONFIG-@<NEWSCONFIG>@}>()=
  452. X. ${NEWSCONFIG-/news/lib/bin/config}
  453. X
  454. XPATH=$NEWSCTL/bin:$NEWSBIN:$NEWSPATH ; export PATH
  455. Xumask $NEWSUMASK
  456. X
  457. Xcd $NEWSCTL
  458. Xrm -f L.* LOCK*                # leftover locks
  459. Xrm -f history.n*            # leftover expire work files
  460. X
  461. Xcd $NEWSARTS/in.coming
  462. Xrm -f nspool.* nruntmp.*        # leftover temporaries
  463. Xfor f in nntp.*                # find partial batches
  464. Xdo
  465. X    while test -f $f        # still there?
  466. X    do
  467. X        name=`getdate now`
  468. X        if test ! -f $name
  469. X        then
  470. X            mv $f $name
  471. X        else
  472. X            sleep 2
  473. X        fi
  474. X    done
  475. Xdone
  476. X$NEWSBIN/ctl/newgroup    # resume new group collection
  477. SHAR_EOF
  478. $TOUCH -am 0220191091 misc/newsboot &&
  479. chmod 0755 misc/newsboot ||
  480. echo "restore of misc/newsboot failed"
  481. set `wc -c misc/newsboot`;Wc_c=$1
  482. if test "$Wc_c" != "594"; then
  483.     echo original size 594, current size $Wc_c
  484. fi
  485. # ============= relay/makefile.patch ==============
  486. echo "x - extracting relay/makefile.patch (Text)"
  487. sed 's/^X//' << 'SHAR_EOF' > relay/makefile.patch &&
  488. X*** ./relay/makefile.orig    Tue Nov  6 14:40:08 1990
  489. X--- ./relay/makefile    Wed Feb 20 17:53:02 1991
  490. X***************
  491. X*** 47,53 ****
  492. X      active.h article.h caches.h mkdirs.h control.h fileart.h \
  493. X      hdrint.h headers.h history.h system.h transmit.h trbatch.h $(SRC)
  494. X  
  495. X! all: makefile relaynews
  496. X      chmod +x sh/[a-z]* aux/[a-z]* ctl/[a-z]*
  497. X  
  498. X  mkfile: makefile
  499. X--- 47,53 ----
  500. X      active.h article.h caches.h mkdirs.h control.h fileart.h \
  501. X      hdrint.h headers.h history.h system.h transmit.h trbatch.h $(SRC)
  502. X  
  503. X! all: makefile relaynews ctl/collng
  504. X      chmod +x sh/[a-z]* aux/[a-z]* ctl/[a-z]*
  505. X  
  506. X  mkfile: makefile
  507. X***************
  508. X*** 55,60 ****
  509. X--- 55,62 ----
  510. X  
  511. X  relaynews: $(OBJ) $(LIBOBJS)
  512. X      $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) $(PRE) $(LIBS) $(LIBOBJS) $(POST) -o $@
  513. X+ ctl/collng: collng.c
  514. X+     $(CC) $(COPTS) -o $@ collng.c
  515. X  lint: $(SRC)
  516. X      $(LINT) $(LINTFLAGS) $(SRC) $(LLIBS) | $(LINTFILT)
  517. X  lint-p: $(SRC)
  518. X***************
  519. X*** 66,72 ****
  520. X  # bininstall: make directories, install programs
  521. X  bininstall: install
  522. X  install: $(NEWSBIN)/relay/relaynews
  523. X! $(NEWSBIN)/relay/relaynews: relaynews
  524. X      -mkdir $(NEWSBIN)/relay $(NEWSBIN)/inject $(NEWSBIN)/ctl
  525. X      rm -f $(NEWSBIN)/relay/relaynews
  526. X      cp relaynews $(NEWSBIN)/relay
  527. X--- 68,74 ----
  528. X  # bininstall: make directories, install programs
  529. X  bininstall: install
  530. X  install: $(NEWSBIN)/relay/relaynews
  531. X! $(NEWSBIN)/relay/relaynews: relaynews ctl/collng
  532. X      -mkdir $(NEWSBIN)/relay $(NEWSBIN)/inject $(NEWSBIN)/ctl
  533. X      rm -f $(NEWSBIN)/relay/relaynews
  534. X      cp relaynews $(NEWSBIN)/relay
  535. X***************
  536. X*** 77,83 ****
  537. X      rm -f $(BIN)/inews
  538. X      -ln $(NEWSBIN)/inject/inews $(BIN)/inews 2>/dev/null || cp sh/inews $(BIN)
  539. X  
  540. X! cmp:    relaynews
  541. X      cmp $(NEWSBIN)/relay/relaynews relaynews
  542. X      for f in `ls sh` ; do cmp $(NEWSBIN)/inject/$$f sh/$$f ; done
  543. X      for f in `ls ctl` ; do cmp $(NEWSBIN)/ctl/$$f ctl/$$f ; done
  544. X--- 79,85 ----
  545. X      rm -f $(BIN)/inews
  546. X      -ln $(NEWSBIN)/inject/inews $(BIN)/inews 2>/dev/null || cp sh/inews $(BIN)
  547. X  
  548. X! cmp:    relaynews ctl/collng
  549. X      cmp $(NEWSBIN)/relay/relaynews relaynews
  550. X      for f in `ls sh` ; do cmp $(NEWSBIN)/inject/$$f sh/$$f ; done
  551. X      for f in `ls ctl` ; do cmp $(NEWSBIN)/ctl/$$f ctl/$$f ; done
  552. X***************
  553. X*** 85,91 ****
  554. X      cmp $(BIN)/inews sh/inews
  555. X      ls -lg $(NEWSBIN)/relay/relaynews | egrep -s '^-rwsrwsr-x  1 news     news'
  556. X  
  557. X! check:    relaynews
  558. X      cmp $(NEWSBIN)/relay/relaynews relaynews || true
  559. X      for f in `ls sh` ; do cmp $(NEWSBIN)/inject/$$f sh/$$f || true ; done
  560. X      for f in `ls ctl` ; do cmp $(NEWSBIN)/ctl/$$f ctl/$$f || true ; done
  561. X--- 87,93 ----
  562. X      cmp $(BIN)/inews sh/inews
  563. X      ls -lg $(NEWSBIN)/relay/relaynews | egrep -s '^-rwsrwsr-x  1 news     news'
  564. X  
  565. X! check:    relaynews ctl/collng
  566. X      cmp $(NEWSBIN)/relay/relaynews relaynews || true
  567. X      for f in `ls sh` ; do cmp $(NEWSBIN)/inject/$$f sh/$$f || true ; done
  568. X      for f in `ls ctl` ; do cmp $(NEWSBIN)/ctl/$$f ctl/$$f || true ; done
  569. X***************
  570. X*** 106,112 ****
  571. X      pr $(PROPTS) $? | $P
  572. X      touch $@
  573. X  clean:
  574. X!     rm -f core a.out relaynews *.o    
  575. X      rm -rf regress/tmp
  576. X  
  577. X  r:    relaynews
  578. X--- 108,114 ----
  579. X      pr $(PROPTS) $? | $P
  580. X      touch $@
  581. X  clean:
  582. X!     rm -f core a.out relaynews *.o ctl/collng
  583. X      rm -rf regress/tmp
  584. X  
  585. X  r:    relaynews
  586. SHAR_EOF
  587. $TOUCH -am 0222150791 relay/makefile.patch &&
  588. chmod 0644 relay/makefile.patch ||
  589. echo "restore of relay/makefile.patch failed"
  590. set `wc -c relay/makefile.patch`;Wc_c=$1
  591. if test "$Wc_c" != "3176"; then
  592.     echo original size 3176, current size $Wc_c
  593. fi
  594. patch -p0 < ./relay/makefile.patch
  595. exit 0
  596. -- 
  597. | Nick Sandru (alias Long Haired Nick)   | Backpacker's First Law:
  598. | Hoje Topholm 37    | e-mail:           | "The thing you need lies either
  599. | DK-3390 Hundested  |  ns@iddth.id.dk   |  in the bottom of your backpack,
  600. | Denmark            |  ns@iddth2.id.dk  |  or in a closet at your home..."
  601.  
  602. exit 0 # Just in case...
  603. -- 
  604. Kent Landfield                   INTERNET: kent@sparky.IMD.Sterling.COM
  605. Sterling Software, IMD           UUCP:     uunet!sparky!kent
  606. Phone:    (402) 291-8300         FAX:      (402) 291-4362
  607. Please send comp.sources.misc-related mail to kent@uunet.uu.net.
  608.