dot.profile revision 1.4
11.4Stsutsui# $NetBSD: dot.profile,v 1.4 2008/02/01 17:18:07 tsutsui Exp $
21.1Sskrll#
31.1Sskrll# Copyright (c) 1997 Perry E. Metzger
41.1Sskrll# Copyright (c) 1994 Christopher G. Demetriou
51.1Sskrll# All rights reserved.
61.1Sskrll# 
71.1Sskrll# Redistribution and use in source and binary forms, with or without
81.1Sskrll# modification, are permitted provided that the following conditions
91.1Sskrll# are met:
101.1Sskrll# 1. Redistributions of source code must retain the above copyright
111.1Sskrll#    notice, this list of conditions and the following disclaimer.
121.1Sskrll# 2. Redistributions in binary form must reproduce the above copyright
131.1Sskrll#    notice, this list of conditions and the following disclaimer in the
141.1Sskrll#    documentation and/or other materials provided with the distribution.
151.1Sskrll# 3. All advertising materials mentioning features or use of this software
161.1Sskrll#    must display the following acknowledgement:
171.1Sskrll#          This product includes software developed for the
181.3Ssalo#          NetBSD Project.  See http://www.NetBSD.org/ for
191.1Sskrll#          information about NetBSD.
201.1Sskrll# 4. The name of the author may not be used to endorse or promote products
211.1Sskrll#    derived from this software without specific prior written permission.
221.1Sskrll# 
231.1Sskrll# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
241.1Sskrll# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
251.1Sskrll# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
261.1Sskrll# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
271.1Sskrll# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
281.1Sskrll# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
291.1Sskrll# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
301.1Sskrll# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
311.1Sskrll# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
321.1Sskrll# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
331.1Sskrll# 
341.1Sskrll# <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>>
351.1Sskrll
361.1SskrllPATH=/sbin:/bin:/usr/bin:/usr/sbin:/
371.1Sskrllexport PATH
381.4StsutsuiTERM=wsvt25
391.1Sskrllexport TERM
401.1SskrllHOME=/
411.1Sskrllexport HOME
421.2SchrisBLOCKSIZE=1k
431.2Schrisexport BLOCKSIZE
441.2SchrisEDITOR=ed
451.2Schrisexport EDITOR
461.1Sskrll
471.1Sskrllumask 022
481.1Sskrll
491.1SskrllROOTDEV=/dev/md0a
501.1Sskrll
511.1Sskrllif [ "X${DONEPROFILE}" = "X" ]; then
521.1Sskrll	DONEPROFILE=YES
531.1Sskrll	export DONEPROFILE
541.1Sskrll
551.1Sskrll	# set up some sane defaults
561.1Sskrll	echo 'erase ^?, werase ^W, kill ^U, intr ^C'
571.2Schris	stty newcrt werase ^W intr ^C kill ^U erase ^? 38400
581.1Sskrll	echo ''
591.1Sskrll
601.1Sskrll	# mount the ramdisk read write
611.1Sskrll	mount -u $ROOTDEV /
621.1Sskrll
631.1Sskrll	# mount the kern_fs so that we can examine the dmesg state
641.1Sskrll	mount -t kernfs /kern /kern
651.1Sskrll
661.2Schris	# pull in the functions that people will use from the shell prompt.
671.2Schris	# . /.commonutils
681.2Schris	# . /.instutils
691.2Schris	dmesg() cat /kern/msgbuf
701.2Schris	grep() sed -n "/$1/p"
711.2Schris
721.1Sskrll	# run the installation or upgrade script.
731.2Schris	if [ -x /sysinst ]; then
741.2Schris		# run the installation or upgrade script.
751.2Schris		sysinst
761.2Schris	else
771.2Schris		echo "This image contains utilities which may be needed"
781.2Schris		echo "to get you out of a pinch."
791.2Schris	fi
801.1Sskrllfi
81