dot.profile revision 1.1
11.1Slukem# $NetBSD: dot.profile,v 1.1 2002/05/07 14:41:37 lukem Exp $
21.1Slukem#
31.1Slukem# Copyright (c) 1997 Perry E. Metzger
41.1Slukem# Copyright (c) 1994 Christopher G. Demetriou
51.1Slukem# All rights reserved.
61.1Slukem# 
71.1Slukem# Redistribution and use in source and binary forms, with or without
81.1Slukem# modification, are permitted provided that the following conditions
91.1Slukem# are met:
101.1Slukem# 1. Redistributions of source code must retain the above copyright
111.1Slukem#    notice, this list of conditions and the following disclaimer.
121.1Slukem# 2. Redistributions in binary form must reproduce the above copyright
131.1Slukem#    notice, this list of conditions and the following disclaimer in the
141.1Slukem#    documentation and/or other materials provided with the distribution.
151.1Slukem# 3. All advertising materials mentioning features or use of this software
161.1Slukem#    must display the following acknowledgement:
171.1Slukem#          This product includes software developed for the
181.1Slukem#          NetBSD Project.  See http://www.netbsd.org/ for
191.1Slukem#          information about NetBSD.
201.1Slukem# 4. The name of the author may not be used to endorse or promote products
211.1Slukem#    derived from this software without specific prior written permission.
221.1Slukem# 
231.1Slukem# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
241.1Slukem# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
251.1Slukem# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
261.1Slukem# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
271.1Slukem# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
281.1Slukem# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
291.1Slukem# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
301.1Slukem# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
311.1Slukem# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
321.1Slukem# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
331.1Slukem# 
341.1Slukem# <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>>
351.1Slukem
361.1SlukemPATH=/sbin:/bin:/usr/bin:/usr/sbin:/
371.1Slukemexport PATH
381.1Slukem
391.1SlukemTERM=sun
401.1Slukemexport TERM
411.1SlukemHOME=/
421.1Slukemexport HOME
431.1SlukemBLOCKSIZE=1k
441.1Slukemexport BLOCKSIZE
451.1SlukemEDITOR=ed
461.1Slukemexport EDITOR
471.1Slukem
481.1Slukemumask 022
491.1Slukem
501.1Slukemif [ "X${DONEPROFILE}" = "X" ]; then
511.1Slukem	DONEPROFILE=YES
521.1Slukem	export DONEPROFILE
531.1Slukem
541.1Slukem	# set up some sane defaults
551.1Slukem	echo 'erase ^?, werase ^W, kill ^U, intr ^C'
561.1Slukem	stty newcrt werase ^W intr ^C kill ^U erase ^? 9600
571.1Slukem	echo ''
581.1Slukem
591.1Slukem	echo -n "Terminal type (just hit ENTER for '$TERM'): "
601.1Slukem	read ans
611.1Slukem	if [ -n "$ans" ];then
621.1Slukem	    TERM=$ans
631.1Slukem	fi
641.1Slukem
651.1Slukem	# mount the kern_fs so that we can find the root device, and also
661.1Slukem	# examine the dmesg state
671.1Slukem	mount -t kernfs /kern /kern
681.1Slukem
691.1Slukem	# hack to get around bugs in kernfs's rootdev/rrootdev lookup.
701.1Slukem	ls -l /dev/* > /dev/null 2>&1
711.1Slukem
721.1Slukem	# mount the ramdisk read write
731.1Slukem	mount -t ffs -u /kern/rootdev /
741.1Slukem
751.1Slukem	# run the installation or upgrade script.
761.1Slukem	sysinst
771.1Slukemfi
78