#! /bin/bash
# Generated by MANIFEST
# See INSTALL for details of format

depend -d /var/adm/sysman/modules
if [ $? -eq 254 ]; then
  log "You must install the 'base' module of the System Manager" y 
  log "before installing this module." y 
  log "" y 
  exit
fi
#! /bin/bash
#
# The System Manager
# An Administration Tool For UNIX
#
# Copyright (c) 1994 Stuart Herbert
# Released under the GNU GPL v2
#
# Bugs/comments/contributions to S.Herbert@Sheffield.ac.uk

if [ -n "$1" ]; then
  case "$1" in
    --SysmanInstall)
      echo "Y : Y : NEWS : Local News System :$0"
      exit
      ;;
    --SysmanAuthor)
      source /var/adm/sysman/bin/ParseMod
      ;;
  esac
fi

title  "Local News System Module"
author "Stuart Herbert" "S.Herbert@sheffield.ac.uk"
comment
comment "This module provides for a local news service, where individual news"
comment "items can be sent to individual groups as required."
comment
comment "As supplied, all users can add to the news.  If you wish to restrict" 
comment "this, create a group called 'news', put everyone who can send news" 
comment "into it, and then 'chgrp new /var/adm/news' and" 
comment "'chmod 664 /var/adm/news' so that only members of the group can add"
comment "to it."
endinfo
pause

require /bin/ash
if [ $? -eq 254 ]; then
  log "You do not have /bin/ash on your system.  Either download this using ftp"
  log "from sunsite.unc.edu (in /pub/Linux/system/Shells), or you will have to"
  log "alter /usr/local/bin/testfornews to call a different shell."
  log
  log "/bin/ash is used because it is significantly smaller than /bin/bash"
  log
fi

target /var/adm sysman

file install/testfornews $TARGETBIN/testfornews 755

if [ $? -eq 0 ]; then
  log "In /etc/csh.login, and /etc/profile, add a line to call"
  log "$TARGETBIN/testfornews, so that when users log in, they are informed"
  log "if there is any new news."
  log 
fi
dir $TARGETDIR/modules/News 755 y
file modules/News/AddToTheNews /var/adm/sysman/modules/News/AddToTheNews 755
file modules/News/EditTheNews /var/adm/sysman/modules/News/EditTheNews 755
file modules/News/README.module /var/adm/sysman/modules/News/README.module 755
file modules/News/ReadAllNews /var/adm/sysman/modules/News/ReadAllNews 755
file modules/News/ReadTheNews /var/adm/sysman/modules/News/ReadTheNews 755
