home *** CD-ROM | disk | FTP | other *** search
/ Unix System Administration Handbook 1997 October / usah_oct97.iso / news / cnews.tar / ctl / delsendsys < prev    next >
Text File  |  1994-10-17  |  950b  |  31 lines

  1. #! /bin/sh
  2. # delsendsys - mail sys file to sender identified in stdin's headers
  3.  
  4. # =()<. ${NEWSCONFIG-@<NEWSCONFIG>@}>()=
  5. . ${NEWSCONFIG-/etc/news/bin/config}
  6.  
  7. PATH=$NEWSCTL/bin:$NEWSBIN/relay:$NEWSBIN:$NEWSPATH ; export PATH
  8. umask $NEWSUMASK
  9.  
  10. replyto="`newsreply`"
  11. (
  12.     echo "To: $replyto"
  13.     echo "Subject: response from `newshostname` to your sendsys request"
  14.     echo
  15.     echo "Responding-System: `cat $NEWSCTL/mailname`"
  16.     case "$1" in
  17.     "")    cat $NEWSCTL/sys ;;
  18.     *)    awk -f $NEWSBIN/canonsys.awk $NEWSCTL/sys |
  19.                         awk '$1 == "'"$1"'"'    ;;
  20.     esac
  21. ) | sed '/^~/s/^/***/' | mail "$replyto"
  22.  
  23. report 'sendsys processed' <<!
  24. $NEWSCTL/sys file has been sent to $replyto.
  25. Please remain calm.  DON'T PANIC.  This is perfectly routine.
  26. Your sys file is public information by definition.
  27. This is a requirement of membership in Usenet.
  28. Please don't waste everyone's time by asking about this on Usenet
  29. or by harassing the person who sent the sendsys control message.
  30. !
  31.