dot.profile revision 1.3
11.3Scgd#	$NetBSD: dot.profile,v 1.3 1999/06/26 06:12:58 cgd Exp $
21.1Sscw#
31.1Sscw# Copyright (c) 1995 Jason R. Thorpe
41.1Sscw# Copyright (c) 1994 Christopher G. Demetriou
51.1Sscw# All rights reserved.
61.1Sscw# 
71.1Sscw# Redistribution and use in source and binary forms, with or without
81.1Sscw# modification, are permitted provided that the following conditions
91.1Sscw# are met:
101.1Sscw# 1. Redistributions of source code must retain the above copyright
111.1Sscw#    notice, this list of conditions and the following disclaimer.
121.1Sscw# 2. Redistributions in binary form must reproduce the above copyright
131.1Sscw#    notice, this list of conditions and the following disclaimer in the
141.1Sscw#    documentation and/or other materials provided with the distribution.
151.1Sscw# 3. All advertising materials mentioning features or use of this software
161.1Sscw#    must display the following acknowledgement:
171.1Sscw#	This product includes software developed by Christopher G. Demetriou.
181.1Sscw# 4. The name of the author may not be used to endorse or promote products
191.1Sscw#    derived from this software without specific prior written permission
201.1Sscw#
211.1Sscw# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
221.1Sscw# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
231.1Sscw# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
241.1Sscw# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
251.1Sscw# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
261.1Sscw# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
271.1Sscw# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
281.1Sscw# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
291.1Sscw# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
301.1Sscw# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
311.1Sscw#
321.1Sscw
331.1SscwPATH=/sbin:/bin:/usr/bin:/usr/sbin:/
341.1Sscwexport PATH
351.1SscwTERM=vt100
361.1Sscwexport TERM
371.2SperryHOME=/
381.2Sperryexport HOME
391.1Sscw
401.1Sscwumask 022
411.1Sscw
421.1Sscwif [ "X${DONEPROFILE}" = "X" ]; then
431.1Sscw	DONEPROFILE=YES
441.3Scgd	export DONEPROFILE
451.1Sscw
461.1Sscw	# set up some sane defaults
471.1Sscw	echo 'erase ^H, werase ^W, kill ^U, intr ^C'
481.1Sscw	stty newcrt werase ^W intr ^C kill ^U erase ^H 9600
491.1Sscw
501.1Sscw	# run update, so that installed software is written as it goes.
511.1Sscw	update
521.1Sscw
531.1Sscw	# get the terminal type
541.1Sscw	_forceloop=""
551.1Sscw	while [ "X${_forceloop}" = X"" ]; do
561.1Sscw		eval `tset -s -m ":?$TERM"`
571.1Sscw		if [ "X${TERM}" != X"unknown" ]; then
581.1Sscw			_forceloop="done"
591.1Sscw		fi
601.1Sscw	done
611.1Sscw
621.1Sscw	# Installing or upgrading?
631.1Sscw	again="true"
641.1Sscw	echo "Welcome to the NetBSD/mvme68k installation miniroot."
651.1Sscw	echo
661.1Sscw	while [ $again = "true" ]; do
671.1Sscw
681.1Sscw		echo 'enter "install" to install NetBSD,'
691.1Sscw		echo '      "upgrade" to upgrade an existing NetBSD system,'
701.1Sscw		echo '   or "shell" for a shell prompt.'
711.1Sscw		echo
721.1Sscw		echo -n "your choice? "
731.1Sscw		read resp
741.1Sscw
751.1Sscw		case "$resp" in
761.1Sscw			install|upgrade|shell)
771.1Sscw				again="false"
781.1Sscw				;;
791.1Sscw			"")
801.1Sscw				echo
811.1Sscw				;;
821.1Sscw			*)
831.1Sscw				echo	"Sorry, $resp isn't valid."
841.1Sscw				echo
851.1Sscw				;;
861.1Sscw		esac
871.1Sscw	done
881.1Sscw
891.1Sscw	case "$resp" in
901.1Sscw		install)
911.1Sscw			install
921.1Sscw			;;
931.1Sscw		upgrade)
941.1Sscw			upgrade
951.1Sscw			;;
961.1Sscw		shell)
971.1Sscw			echo 'If you want to run install or upgrade later,'
981.1Sscw			echo 'simply type "install" or "upgrade" at the'
991.1Sscw			echo 'shell prompt. Good luck!'
1001.1Sscw			;;
1011.1Sscw	esac
1021.1Sscwfi
103