home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 300-399 / ff319.lzh / CNewsSrc / cnews.orig.lzh / misc / locknews < prev    next >
Text File  |  1989-06-27  |  495b  |  19 lines

  1. #! /bin/sh
  2. # lock the news system & arrange to unlock later
  3. # =()<. ${NEWSCONFIG-@<NEWSCONFIG>@}>()=
  4. . ${NEWSCONFIG-/usr/lib/news/bin/config}
  5.  
  6. PATH=$NEWSCTL/bin:$NEWSBIN:$NEWSPATH    # don't export it
  7. umask $NEWSUMASK
  8.  
  9. cd $NEWSCTL
  10. trap : 1 2 3 15            # kids can be killed, but not me
  11. if newslock sys LOCK; then
  12.     echo 'news system locked by you'
  13.     PS1="newslocked$PS1 " ${SHELL-/bin/sh}
  14.     rm -f LOCK
  15.     echo 'news system unlocked now'
  16. else
  17.     echo 'inadequate permissions, or news system already locked'
  18. fi
  19.