# Copyright (c) 1995 by the Student Information Processing Board
# 	  of the Massachusetts Institute of Technology
#  
# Permission to use, copy, modify, and distribute this software
# and its documentation for any purpose and without fee is
# hereby granted, provided that the above copyright notice
# appear in all copies and that both that copyright notice and
# this permission notice appear in supporting documentation,
# and that the names of M.I.T. and the M.I.T. S.I.P.B. not be
# used in advertising or publicity pertaining to distribution
# of the software without specific, written prior permission.
# M.I.T. and the M.I.T. S.I.P.B. make no representations about
# the suitability of this software for any purpose.  It is
# provided "as is" without express or implied warranty.
#
#	$Id: setup.sh,v 1.25 1995/12/25 07:33:33 ghudson Exp ghudson $
#	$Source: /mit/netbsd/dev/install/server/RCS/setup.sh,v $

# /tmp/vars outputs:
#	kernel		whether this system is adp or other
#	osrev		revision of the OS we're installing
#	athenarev	revision of the Athena software we're installing
#	host		unqualified hostname of this system
#	domain		domain name of this system
#	intf		network interface device
#	ifaddr		IP address of network interface
#	ifnetmask	netmask of network interface
#	ifbcast		broadcast address of network interface
#	ifflags		flags of network interface
#	ifgateway	gateway address of subnet
#	on_mitnet	whether the machine is on MITnet

# This file gets read using ". /setup" by the connect script as soon
# as the NFS server is NFS-mounted, so we have access to all the
# variables in that script.

# Create temporary filesystem.
mount_mfs -s 1024 swap /tmp

. /serverid

# Write variable definitions to /tmp/vars so they can be read by /install.
cat > /tmp/vars << EOM
kernel="$kernel"
osrev="$osrev"
athenarev="$athenarev"
host="$host"
domain="$domain"
intf="$intf"
ifaddr="$ifaddr"
ifnetmask="$ifnetmask"
ifbcast="$ifbcast"
ifflags="$ifflags"
ifgateway="$ifgateway"
on_mitnet="$on_mitnet"
srvd="$srvd"
os="$os"
EOM

modload -o /tmp/netbsd_afs -eafsmodload /nfs/afsclient/libafs.o
/nfs/afsclient/afsd -confdir /nfs/afsclient -logfile /tmp/AFSLog
# /nfs/afsclient/cacheinfo: /afs:memcache-ignores-this-field:2048

ln -s $srvd /tmp/srvd
ln -s $os /tmp/os
