dot.profile revision 1.6
11.6Scgd# $NetBSD: dot.profile,v 1.6 2000/06/14 22:52:45 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.6Scgd#          This product includes software developed for the
181.6Scgd#          NetBSD Project.  See http://www.netbsd.org/ for
191.6Scgd#          information about NetBSD.
201.1Sscw# 4. The name of the author may not be used to endorse or promote products
211.6Scgd#    derived from this software without specific prior written permission.
221.6Scgd# 
231.1Sscw# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
241.1Sscw# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
251.1Sscw# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
261.1Sscw# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
271.1Sscw# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
281.1Sscw# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
291.1Sscw# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
301.1Sscw# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
311.1Sscw# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
321.1Sscw# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
331.6Scgd# 
341.6Scgd# <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>>
351.1Sscw
361.1SscwPATH=/sbin:/bin:/usr/bin:/usr/sbin:/
371.1Sscwexport PATH
381.1SscwTERM=vt100
391.1Sscwexport TERM
401.2SperryHOME=/
411.2Sperryexport HOME
421.1Sscw
431.1Sscwumask 022
441.1Sscw
451.1Sscwif [ "X${DONEPROFILE}" = "X" ]; then
461.1Sscw	DONEPROFILE=YES
471.3Scgd	export DONEPROFILE
481.1Sscw
491.1Sscw	# set up some sane defaults
501.1Sscw	echo 'erase ^H, werase ^W, kill ^U, intr ^C'
511.1Sscw	stty newcrt werase ^W intr ^C kill ^U erase ^H 9600
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