11.2Smartin# $NetBSD: dot.profile,v 1.2 2020/01/09 19:17:41 martin Exp $
21.1Skiyohara#
31.1Skiyohara# Copyright (c) 1995 Jason R. Thorpe
41.1Skiyohara# Copyright (c) 1994 Christopher G. Demetriou
51.1Skiyohara# All rights reserved.
61.1Skiyohara# 
71.1Skiyohara# Redistribution and use in source and binary forms, with or without
81.1Skiyohara# modification, are permitted provided that the following conditions
91.1Skiyohara# are met:
101.1Skiyohara# 1. Redistributions of source code must retain the above copyright
111.1Skiyohara#    notice, this list of conditions and the following disclaimer.
121.1Skiyohara# 2. Redistributions in binary form must reproduce the above copyright
131.1Skiyohara#    notice, this list of conditions and the following disclaimer in the
141.1Skiyohara#    documentation and/or other materials provided with the distribution.
151.1Skiyohara# 3. All advertising materials mentioning features or use of this software
161.1Skiyohara#    must display the following acknowledgement:
171.1Skiyohara#          This product includes software developed for the
181.1Skiyohara#          NetBSD Project.  See http://www.NetBSD.org/ for
191.1Skiyohara#          information about NetBSD.
201.1Skiyohara# 4. The name of the author may not be used to endorse or promote products
211.1Skiyohara#    derived from this software without specific prior written permission.
221.1Skiyohara# 
231.1Skiyohara# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
241.1Skiyohara# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
251.1Skiyohara# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
261.1Skiyohara# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
271.1Skiyohara# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
281.1Skiyohara# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
291.1Skiyohara# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
301.1Skiyohara# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
311.1Skiyohara# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
321.1Skiyohara# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
331.1Skiyohara# 
341.1Skiyohara# <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>>
351.1Skiyohara
361.1SkiyoharaPATH=/sbin:/bin:/usr/bin:/usr/sbin:/
371.1Skiyoharaexport PATH
381.1SkiyoharaTERM=vt100
391.1Skiyoharaexport TERM
401.1SkiyoharaHOME=/
411.1Skiyoharaexport HOME
421.1Skiyohara
431.1Skiyoharaumask 022
441.1Skiyohara
451.1Skiyoharaif [ "X${DONEPROFILE}" = "X" ]; then
461.1Skiyohara	DONEPROFILE=YES
471.1Skiyohara	export DONEPROFILE
481.1Skiyohara
491.1Skiyohara	# set up some sane defaults
501.1Skiyohara	echo 'erase ^H, werase ^W, kill ^U, intr ^C, status ^T'
511.1Skiyohara	stty newcrt werase ^W intr ^C kill ^U erase ^H status ^T 9600
521.1Skiyohara
531.1Skiyohara	# mount root read-write
541.1Skiyohara	mount -u /dev/md0a /
551.1Skiyohara
561.1Skiyohara	# mount a /tmp on mfs, to avoid filling the md
571.1Skiyohara	mount -t mfs swap /tmp
581.1Skiyohara
591.1Skiyohara	# get the terminal type
601.1Skiyohara	_forceloop=""
611.1Skiyohara	while [ "X${_forceloop}" = X"" ]; do
621.1Skiyohara		eval `tset -s -m ":?$TERM"`
631.1Skiyohara		if [ "X${TERM}" != X"unknown" ]; then
641.1Skiyohara			_forceloop="done"
651.1Skiyohara		fi
661.1Skiyohara	done
671.1Skiyohara
681.1Skiyohara	# Installing or upgrading?
691.1Skiyohara	_forceloop=""
701.1Skiyohara	while [ "X${_forceloop}" = X"" ]; do
711.1Skiyohara		echo -n '(I)nstall, (S)hell or (H)alt ? '
721.1Skiyohara		read _forceloop
731.1Skiyohara		case "$_forceloop" in
741.1Skiyohara			i*|I*)
751.2Smartin				/sysinst || stty sane
761.1Skiyohara				;;
771.1Skiyohara
781.1Skiyohara			s*|S*)
791.1Skiyohara				/bin/sh
801.1Skiyohara				;;
811.1Skiyohara
821.1Skiyohara			h*|H*)
831.1Skiyohara				/sbin/halt
841.1Skiyohara				;;
851.1Skiyohara
861.1Skiyohara			*)
871.1Skiyohara				_forceloop=""
881.1Skiyohara				;;
891.1Skiyohara		esac
901.1Skiyohara	done
911.1Skiyoharafi
92