home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume2 / smail-xenix-v3 / install_smail < prev    next >
Encoding:
Text File  |  1991-08-07  |  1.1 KB  |  51 lines

  1. : install_smail
  2. # Shell script to install smail in a Xenix System V system.
  3. #
  4. # Written by Chip Salzenberg (chip@ateng.UUCP).
  5. # Released to Usenet on 01 Dec 1987.
  6. #
  7. # Note that this script renames the standard Xenix rmail and execmail
  8. # programs to rmail.x and execmail.x respectively.  If those `.x' files
  9. # already exist, then no renaming takes place, so you can run this script
  10. # more than once without losing those renamed programs.
  11. #
  12. # BTW, be sure to test everything thoroughly; a broken mail system is
  13. # sure to upset any users on your system.
  14.  
  15. COPY="copy -m"
  16. SMAIL="/usr/bin/smail"
  17. RMAIL="/usr/bin/rmail"
  18. EXECM="/usr/lib/mail/execmail"
  19.  
  20. for f in smail execm
  21. do
  22.     if [ ! -x $f ]; then
  23.     echo "You need to compile $f first."
  24.     exit 1
  25.     fi
  26. done
  27.  
  28. echo "Installing current smail -- you have 5 seconds to abort."
  29. sleep 5
  30.  
  31. if [ ! -f $RMAIL.x ]; then
  32.     mv $RMAIL $RMAIL.x
  33. fi
  34. rm -f $RMAIL
  35. if [ ! -f $EXECM.x ]; then
  36.     mv $EXECM $EXECM.x
  37. fi
  38. rm -f $EXECM
  39.  
  40. $COPY execm $EXECM
  41. chown bin $EXECM
  42. chgrp bin $EXECM
  43. chmod 755 $EXECM
  44.  
  45. rm -f $SMAIL $RMAIL
  46. $COPY smail $SMAIL
  47. chown bin $SMAIL
  48. chgrp bin $SMAIL
  49. chmod 755 $SMAIL
  50. ln $SMAIL $RMAIL
  51.