#!/bin/csh -f
#
# Network Installation Kit
#
# install.client: install menu for normal clients
#
# Tom Coppeto
# MIT Network Group
# 17 September 1994
#
# Last Modified 12 November 1995
#

set pltfrm = `/usr/bin/uname`

source $util/aliases

if ($sing == true) $sounds/kill_song
version add ClientPackage $clntpkgversion

set round = 1

menu:
clear

echo ""
echo ""
echo "                          Installation Menu"
echo $bar
echo ""
echo ""
echo "                      1.   Network utilities"
if($round != 1) then
        echo "                      2.   Kerberos"
endif

if($round == 3) then
        echo "                      3.   Andrew File System"
        echo "                      4.   Zephyr"
        echo "                      5.   Mail"
endif

echo ""
echo "                      a    install all packages"
echo ""
if($interactive == false) then
        echo "                      t.   Step through installation procedure (will automate)"
else
        echo "                      t.   Automate installation procedure (will step)"
endif
echo "                      h    Help on menu choices"
if($round != 3) then
echo "                      n    Next menu"
endif
echo "                      r    Return to previous menu"
echo ""
echo ""
get_response "Menu choice: " "1" "2" "3" "4" "5" "all" "t" "help" "next" "return"

switch ($status)
 case 1:
        $net/install.net
        if($status != 0) goto menu
        breaksw
 case 2:
        $krb/install.kerberos
        if($status != 0) goto menu
        breaksw
 case 3:
        $afs/install.afs
        if($status != 0) goto menu
        breaksw
 case 4:
        $zephyr/install.zephyr
        if($status != 0) goto menu
        breaksw
 case 5:
        $mail/install.mail
        if($status != 0) goto menu
        breaksw
 case 6:
	$net/install.net
        if($status != 0) goto menu
        $krb/install.kerberos
        if($status != 0) goto menu
        $afs/install.afs
        if($status != 0) goto menu
        $zephyr/install.zephyr
        if($status != 0) goto menu
        $mail/install.mail
        if($status != 0) goto menu
        set round = 3
	breaksw
 case 7:
        if($interactive == true) then
                setenv interactive false
        else
                setenv interactive true
        endif
        if($verbose == false && $interactive == true) then
                echo "cannot have a quiet interaction".
                sleep 5
                setenv verbose true
        endif
	goto menu
        breaksw
 case 8:
	goto help
	breaksw
 case 9:
        breaksw
 case 10:
	if ($pltfrm == "SunOS") then
		if (-f $rcconf) then
                	config.update
       		 endif
	else
        	if (-f $versionfile) then
                	config.update
        	endif
	endif
        exit 0
        breaksw
endsw

if($round == 2) set round = 3
if($round == 1) set round = 2
goto menu


help:

clear
echo ""
echo ""
echo "                          About the Menus"
echo $bar
echo ""
echo ""
echo "1. Network Utilities "
echo ""
echo "This category of software is strongly recommended for use on MITnet."
echo "The components are as follows: "
echo ""
echo "*** Domain name service *** "
echo ""
echo "A domain name system resolver (well, not yet) and daemon are installed"
echo "which provides transparent resolution of internet domain names. This"
echo "particular version is also forward compatible for use in the Athena"
echo "computing environment."
echo ""
echo "*** Time synchronization service ***"
echo ""
echo "A network time synchronization daemon (timed) is installed to keep "
echo "your host in sync with other machines on the network. This particular"
echo "timed has been tuned to be well behaved in our environment."
echo ""
echo "*** Network management *** "
echo ""
echo "A snmpd (simple network managament protocol daemon) will be installed "
echo "to allow for queries your machine for network statistics useful for "
echo "spotting and debugging problems with your connection."
echo ""
get_response "Press <return> to continue..." "<return>"

if($round == 1) goto menu

clear
echo ""
echo ""
echo "                          About the Menus"
echo $bar
echo ""
echo ""
echo "2. Andrew File System"
echo ""
echo "The Andrew File System is used almost exclusively within the"
echo "Athena Computing environment. With this package, you will have"
echo "the ability to access these file system resources, including"
echo "other AFS 'cells' around the world."
echo ""
echo "The pieces of this package includes a dynamic library your "
echo "operating system will load at boot time, a local cache of"
echo "file space you will need to configure during or after installation,"
echo "and the Kerberos authentication system."
echo ""
get_response "Press <return> to continue..." "<return>"

goto menu

