#	@(#) upgrade 3.0 21may94 Morgan_Davis @(#)
#
#	ProLine 3.0 Upgrade Script
#	Requires ProLine 3.0 to be installed before running
#	(C)opyright 1994 Morgan Davis Group

if $version[1] < "3.0" then
 echo "C-Shell 3.0 not running!  Can't finish upgrade."
 exit -1
endif

set new="$version[5] $version[6]" old="$version[5] 2.0" x=v20 y=v30
echo "^I^I      Resuming the $new Upgrade"
unset exit; stty lines 0
set wait="This may take a while.  Please wait..."
alias upgv "if -f $/!\^.$x then mv $/!\^.$x $/!\^"
alias qmv  "if \"\$it\" <> "N" and \"\$it\" <> "n" then rm !\^.$x else mv !\^.$x !\^"
alias qrpl "echo -n \"Use the $new version of !\^? (Y/N) Y^H\";read it; qmv !\^"
alias qupv "if -f $/!\^.$x then qrpl $/!\^"
set line="___________________________________________________________________________^M"

echo "$line^MImportant Files^M"
echo "$new includes new and improved versions of files you may have"
echo "modified.  If you haven't changed your system much, you can probably"
echo "answer Y to the following questions.^M"
qupv etc/badlogin
qupv etc/cshrc
qupv etc/motd
qupv etc/welcome
qupv etc/default/cshrc
qupv etc/default/login
qupv etc/default/mail
qupv etc/default/signature
qupv sys/pcs/cs.herald
qupv pub/index
qupv pub/proline/index
upgv etc/crontab

if -f $/etc/rc.$x and not -f $/etc/upgrade.$y then
 echo "$line^MStartup Script^M"
 echo "When $old started up, it ran your \$/etc/rc script.  $new"
 echo "now ships with a factory installed rc script that should not be"
 echo "modified.  This allows the Morgan Davis Group to control the startup"
 echo "behavior of ProLine, like being able to run upgrade scripts such as"
 echo "this one.  This new rc script, as a final step, will see if \$/etc/rc2"
 echo "exists and chains to it.  It is recommended that your old custom rc"
 echo "script be renamed to rc2 so that your custom tasks can be performed.^M"
 echo -n "Rename your old rc script to rc2? (Y/N) Y^H"
 read it
 if "$it" <> "N" and "$it" <> "n" then
  mv $/etc/rc.$x $/etc/rc2
 else
  rm $/etc/rc.$x
 endif
endif

if -f $/etc/plush.m.$x then
 echo "$line^MPlush^M"
 echo "The ProLine Users Shell (plush) has been enhanced greatly.  If you"
 echo "haven't heavily modified your plush menus, you should use the new"
 echo "menu scheme that ships with $new.  Keeping the old plush.m"
 echo "requires some editing to make it compatible with $new.^M"
 qupv etc/plush.m
 echo "^MBe sure to read the new plush manual to find out how to set up"
 echo "custom menus on a per-user, per-group, or global basis."
endif

if -f $/bin.$x then
 echo "$line^MPrograms^M"
 echo "Your old \$/bin and \$/sys/bin directories have been saved as"
 echo "\$/bin.$x and \$/sys/bin.$x.  If you added programs or scripts, you"
 echo "can copy them to the new \$/sys/local/bin directory or into your"
 echo "personal bin directory (\~/bin).  Please make sure that they work"
 echo "properly with $new first.  If you haven't added any programs,"
 echo "you can delete the $old programs."
 echo -n "^MRemove the old $old programs? (Y/N) Y^H"
  read it
  if "$it" <> "N" and "$it" <> "n" then
   echo $wait
   rmdir $/bin.$x $/sys/bin.$x
  endif
endif

if -f $/sys/man.$x then
 echo "$line^MManuals^M"
 echo "Your old \$/sys/man directory has been saved as \$/sys/man.$x.  If"
 echo "you have added additional manual files, you should copy them to the"
 echo "new \$/sys/man/man.L (L for local) directory.  If you haven't added"
 echo "added any, you can delete the $old manuals."
 echo -n "^MRemove the old $old manuals? (Y/N) Y^H"
 read it
 if "$it" <> "N" and "$it" <> "n" then
  echo $wait
  rmdir $/sys/man.$x
 endif
 echo "Creating a new whatis database.  $wait"
 whatis -mq
endif

if -f $/etc/help.$x then
 echo "$line^MHelp Files^M"
 echo "The old \$/etc/help directory was saved as \$/etc/help.$x.  If you"
 echo "changed any of the files in there, you may copy them into \$/etc/help."
 echo "If you haven't changed any, you can delete the $old help files."
 echo -n "^MRemove the old $old help files? (Y/N) Y^H"
 read it
 if "$it" <> "N" and "$it" <> "n" then
  echo $wait
  rmdir $/etc/help.$x
 endif
endif

if -f $/etc/newsys then
 echo "$line^MUsenet News^M"
 echo "Next, you'll be taken to the new NED (Newsys Editor) utility.  Your job"
 echo "is to press the U key when you get there so that your newsys file can"
 echo "be updated, sorted, and optimized to work with $new's news tools."
 echo "When NED comes up, press U to Update your newsys.  When it is done,"
 echo "type Q to quit and continue the $new upgrade."
 cp $/etc/newsys $/etc/newsys.bak
 echo -n "^MPress RETURN to update your newsys file "; read it; ned
 echo "FYI: A copy of your original newsys file was saved as \$/etc/newsys.bak"
endif

if -f $/etc/rsrc/batch.rsrc then
 echo "^MThe \$/etc/rsrc/batch.rsrc file is no longer needed by the batch program."
 echo -n "Delete it? (Y/N) "; read it
 if "$it" = "y" or "$it" = "Y" then rm $/etc/rsrc/batch.rsrc
endif

echo "$line^MDirectories^M"
if ! -f $/sys/man/man.L then
 if -f $/sys/man/man.LOCAL then
  echo Renaming $/sys/man/man.LOCAL to $/sys/man/man.L
  mv $/sys/man/man.LOCAL $/sys/man/man.L
 else
  echo Creating $/sys/man/man.L
  mkdir $/sys/man/man.L
 endif
endif

if ! -f $/sys/local/bin then
 if ! -f $/sys/local then mkdir $/sys/local
 echo Creating $/sys/local/bin
 mkdir $/sys/local/bin
endif

dstat +x $/bin $/sys/bin
dstat +x $/sys/local/bin
dstat +x $/games
dstat +r $/etc/help
dstat +r $/pub
dstat +r $/pub/proline
dstat +r $/games/lib/help

if -f $/etc/upgrade then
 echo "$line^MUpgrade News^M"
 echo "Sending the $new Upgrade News to your mailbox..."
 tail +177 $/etc/upgrade >$tmpdir/n
 rcp -a $tmpdir/n root -s "$new News" -f mdavis@pro-sol.cts.com
 rm $tmpdir/n
 sendmail
endif

echo "$line^MDone!^M"
echo "The $new Upgrade is complete!  Check your mail for details.  It is"
echo "MANDATORY that you carefully read the Upgrade News in your mailbox!"
echo "Failure to read it, and any subsequent postings to pro.line.admin on"
echo "items covered by it, is grounds for inflamatory RTFM replies. :-)"
echo -n "^MPress RETURN now to restart $new "; read it
echo "Restarting.  One moment..."
if -f $/etc/upgrade then
 echo "mv $/etc/upgrade $/etc/upgrade.$y; boot -r" >$tmpdir/cleanup
 source $tmpdir/cleanup
endif
boot -r; exit

###########################################################################

			ProLine 3.0 Upgrade News

###########################################################################

Finally, after two years of work, ProLine 3.0 is now complete!

This document describes changes to ProLine that require some human
intervention.  This is by no means all that has been improved in ProLine
3.0.  For more details, use the "hist 94" command, and read the new
manuals for complete information on all the new features and changes.

Most of the upgrade process has been automated for your convenience.
Here are the things that you need to manually change (or be aware of) to
fully complete the ProLine 3.0 upgrade:

o  Startup Bootstrap
   Since the ProLine System Directory now includes the ProLine Installer
   software, there are new files in your $/ directory.  What used to be
   called Startup is now called ProLine.  And what is now called Startup is
   actually the ProLine Installer Bootstrap and Main Menu.  If the
   Startup program detects that ProLine has already been installed and
   configured, it initiates ProLine Auto-Start Mode.  After a delay period,
   (or by pressing RETURN) it will start ProLine automatically.  Press ESC
   to cancel Auto-Start and get right to the Installer's Main Menu.

o  New StoreGS Module
   Apple IIGS owners should edit the $/etc/rsrc/startup.rcrc file and change
   the line that consists of "Store" to "Store|GS". This gives ProLine 32K of
   internal system data storage on the IIGS.

o  New Turbo ASB Serial Modules
   See the Important Notes item on the ProLine Installer's Main Menu for
   details on using the Turbo ASB Super Serial Card enhancement.

o  Login
   The login program, which is run after ProLine starts up and whenever
   a caller logs out to recycle the system for new callers, can now run
   any command after a user logs out.  Traditionally, login would check
   to see if pending mail in the spool directory required sendmail to
   deliver it.  You can now supercede this by editing the second line
   of the $/etc/login.rsrc file and putting any command you like in
   there (including a shell script).

   This command line should probably invoke a script that does whatever
   you need, and ultimately invoke sendmail to deliver pending mail.

   Note: ProLine sites that have been around since 2.0 and earlier
   should check the second line of your login.rsrc file to make sure
   that it is either totally blank or contains a valid command line.
   That line used to hold the administrator's full name in earlier
   versions of ProLine.  If that line contains your name, erase it
   to avoid error messages whenever someone logs out.

   Login now fully resets the modem before displaying the Waiting prompt.

o  Newsys
   The unbatch command no longer takes responsibility for fixing illegal
   newsgroup names for you automatically.  This speeds it up quite a bit.
   That is why it was required that ned be used to update your newsys file.

   Related: The batch command scans through newsys now to find local
   newsgroup mailboxes, so your $/etc/rsrc/batch.rsrc file is no longer
   necessary.

o  High Speed Modems
   If you have a IIGS and a high-speed modem, you can change the modemcap
   file to use 38,400bps for added throughput.  If your IIGS is
   accelerated, you might even be able to use 57,600bps. To change your
   modemcap, just enter "mc" at the C-Shell command line.  The updated "mc"
   command is smart enough to use your configured modemcap if you don't
   specify any modemcap argument.

o  Password File
   Edit your password file (but make a backup copy first!).  Using global
   search and replace in your editor, change all occurrences of bin/ to
   nothing (in other words, delete all bin/ patterns). Do the same thing
   for sys/bin/ or any other interpreter paths that use any of the standard
   executable search paths in ProLine. Yes, this includes the argument to
   the adduser program (your "register" account), too.  ProLine is
   intelligent about finding programs in the various directories --
   you don't have to use explicit pathnames, although they're still
   acceptable.  In fact, you don't even need to include csh as a prefix
   before launching shell scripts, as ProLine will do this for you.

o  C-Shell Init/Login Scripts
   There is a new global script for C-Shell, $/etc/cshrc.  This file
   contains commands that are executed whenever someone logs in with a
   C-Shell (csh).  This makes it possible for you to force certain commands
   to take place for each user so that you don't have to worry about them
   removing commands from their personal login script.  With this new
   feature, you may want to edit your $/etc/default/login file (see next
   item).

   Additionally, the C-Shell now supports personal login and cshrc files. 
   When a C-Shell first starts, it runs the user's login script.  The user
   may want to add a command in his login script to "source ~/cshrc" as
   well.  The personal cshrc is run each time a new C-Shell is started.  So
   this is a great place to assign variables and create aliases to make
   them "global" to all invocations of the C-Shell.

   Note: Existing accounts will not have these new personal login nor
   cshrc files.  They still have the old original login script only.

o  Adduser
   Please read the new adduser manual to find out about the new mkuser
   shell script that it invokes as part of the account installation
   process.  The mkuser script gives you more flexibility in how user
   accounts are created, what gets copied into their directories, etc.
   
o  Mdss and Sendmail
   Mdss no longer invokes sendmail by default after a session in which
   files were received.  This is now optional, controlled by the new -s
   flag.  You might want to upgrade your L.sys entries to include -s to
   continue using the older method.

o  Mail Aliases
   The $/etc/aliases file now supports a special > prefix to expanded
   aliases.  When followed by a filename, any mail sent to an alias that
   expands to >filename causes the letter to be written into the
   corresponding file.  Likewise, >>filename appends the letter to the file.
   Finally, if either > or ~ are specified with no following text, letters
   sent to that alias are just ignored.  This is perfect for the null alias
   so that anything mailed to null just goes away automatically. Example:  

   null: ~

   You might want to change your aliases file to use this new feature.
   Don't forget to update your custom maint2 script if it has logic to
   remove null mailboxes.

o  Usenet News
   ProLine's Conference System now has the ability to post articles to
   the Usenet News system almost directly.  Before, we had to send the
   articles to an alias on a Unix site that redirected the contents into
   a desired newsgroup.  This is now almost totally automated to take
   the burden off Unix adminstrators so that they don't have to maintain
   a slew of Usenet posting aliases for us.

   This is now done by a new addressing convention in CS's i.. files.
   The topic entries in i.. now use this format:

	topic:host!rnews;newsgroup:signature

   All that's changed is that instead of the address of a mailing alias,
   the address field now includes the address to the Unix host's rnews
   account, and a semi-colon separates it from the newsgroup's official
   name (note: periods instead of dashes).  Example:

	apple2:crash.cts.com!rnews;comp.sys.apple2:1

   You can use csmod's topic editor to change the networking information
   for each topic.  The updated csmod will prompt for the posting address
   (e.g. crash.cts.com!rnews).  Then it will separately prompt for the
   newgroup name (e.g. comp.sys.apple2).

   Not all Unix hosts support an incoming rnews mailing address, but it
   is easy to setup if the host has a decent mailer (e.g., smail).  You
   can use crash.cts.com!rnews if your local host doesn't offer this.

   Note: For ProLine groups (e.g., pro-line-user), you continue to send
   articles to pro-sol.cts.com!pro-line-user (not rnews!), but you now
   include the official newsgroup name as well.  It is desirable and
   likely that the next ProLine upgrade will handle news like the rest
   of the world.

o  InteleTerm
   InteleTerm (it) and its compiler (itc) have been improvement greatly.
   Some subtle changes to the scripting language require that you recompile
   your scripts.  If you've avoided IT in the past in favor of an external
   communications program, take a second look.

o  RAM Disk
   If you have your $tmpdir set up on a RAM disk, you might want to put
   these commands in your $/etc/rc2 script to copy common files to the
   RAM disk for extra speed:

   cp $/etc/plush.m $/etc/aliases $/etc/paths $/etc/cshrc $tmpdir
   cp $/sys/modules/parse $/bin/cshx $/bin/plush $/bin/csx $tmpdir

o  Mdssclean
   This program takes some new arguments, notably the -d argument.
   You might want to edit your maint2 script to use these newer options.
   Double-check your mdssclean.rsrc file, too.  See the mdssclean manual.

o  Games
   To make the new Blackjack game work, you need to read the manual to find
   out how to assign a bank account for it with the new Bank game.  Oh,
   and there are NO bugs in the Cyber game that cause it to crash into
   BASIC's ] prompt.  Trust me!  :-)


Final Notes

The upgrade script for 3.0 is found in $/install/scripts/upgrade.  You
can re-run this script at any time, even on a fully or partially
upgraded system.  You can also run the entire ProLine Installer upgrade
procedure again over your current system without ill effects.  The only
note of caution is that if you run it again, say No to the question
about renaming your "old rc" script to rc2.  That only needs to be done
once when you upgrade from 2.0 to 3.0.

As a final step, the upgrade script creates a "cleanup" script in your
temporary files directory ($tmpdir) that you can now remove.

If you copied the ProLine.1 and ProLine.2 disks to a directory on your
hard disk for speedier installation/upgrade, you can delete those, too.


Bugs

Report any problems with this upgrade to the pro.line.admin newsgroup.


Future Projects

ProLine 3.0 is like a brand new program.  But there are some items that
I wanted to do that will have to wait until the next version.  These are
DL (which is the first priority), a real news reader interface to
replace CS, and an updated news distribution scheme.  This is one reason
why ned's <A>dd and <E>dit commands are missing.  It is likely that the
newsys file will go away for something requiring less tending.  Ned is
fully functional except for two commands, which I may complete in my
spare time and offer through a public release.   For now, I didn't want
it to hold up the 3.0 release any longer.

Thanks for continuing to support me so that I can continue to give
support to you.  I hope you enjoy ProLine 3.0 and look forward to
your feedback.

--Morgan
