xref: /netbsd/distrib/zaurus/ramdisk/dot.profile (revision 42d0f98b)
1*42d0f98bSmartin# $NetBSD: dot.profile,v 1.4 2020/01/09 19:17:46 martin Exp $
2a6421eb7Schris#
3a6421eb7Schris# Copyright (c) 1997 Perry E. Metzger
4a6421eb7Schris# Copyright (c) 1994 Christopher G. Demetriou
5a6421eb7Schris# All rights reserved.
6a6421eb7Schris#
7a6421eb7Schris# Redistribution and use in source and binary forms, with or without
8a6421eb7Schris# modification, are permitted provided that the following conditions
9a6421eb7Schris# are met:
10a6421eb7Schris# 1. Redistributions of source code must retain the above copyright
11a6421eb7Schris#    notice, this list of conditions and the following disclaimer.
12a6421eb7Schris# 2. Redistributions in binary form must reproduce the above copyright
13a6421eb7Schris#    notice, this list of conditions and the following disclaimer in the
14a6421eb7Schris#    documentation and/or other materials provided with the distribution.
15a6421eb7Schris# 3. All advertising materials mentioning features or use of this software
16a6421eb7Schris#    must display the following acknowledgement:
17a6421eb7Schris#          This product includes software developed for the
18a6421eb7Schris#          NetBSD Project.  See http://www.NetBSD.org/ for
19a6421eb7Schris#          information about NetBSD.
20a6421eb7Schris# 4. The name of the author may not be used to endorse or promote products
21a6421eb7Schris#    derived from this software without specific prior written permission.
22a6421eb7Schris#
23a6421eb7Schris# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
24a6421eb7Schris# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
25a6421eb7Schris# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
26a6421eb7Schris# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
27a6421eb7Schris# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
28a6421eb7Schris# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29a6421eb7Schris# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30a6421eb7Schris# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31a6421eb7Schris# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
32a6421eb7Schris# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33a6421eb7Schris#
34a6421eb7Schris# <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>>
35a6421eb7Schris
36a6421eb7SchrisPATH=/sbin:/bin:/usr/bin:/usr/sbin:/
37a6421eb7Schrisexport PATH
38a6421eb7SchrisTERM=wsvt25
39a6421eb7Schrisexport TERM
40a6421eb7SchrisHOME=/
41a6421eb7Schrisexport HOME
42a6421eb7SchrisBLOCKSIZE=1k
43a6421eb7Schrisexport BLOCKSIZE
44a6421eb7SchrisEDITOR=ed
45a6421eb7Schrisexport EDITOR
46a6421eb7Schris
47a6421eb7Schrisumask 022
48a6421eb7Schris
49a6421eb7SchrisROOTDEV=/dev/md0a
50a6421eb7Schris
51a6421eb7Schrisif [ "X${DONEPROFILE}" = "X" ]; then
52a6421eb7Schris	DONEPROFILE=YES
53a6421eb7Schris	export DONEPROFILE
54a6421eb7Schris
55a6421eb7Schris	# set up some sane defaults
56a6421eb7Schris	echo 'erase ^?, werase ^W, kill ^U, intr ^C'
57d7edcabeSnonaka	stty newcrt werase ^W intr ^C kill ^U erase ^? 9600
58a6421eb7Schris	echo ''
59a6421eb7Schris
60a6421eb7Schris	# mount the ramdisk read write
61a6421eb7Schris	mount -u $ROOTDEV /
62a6421eb7Schris
63a6421eb7Schris	# pull in the functions that people will use from the shell prompt.
64a6421eb7Schris	# . /.commonutils
65a6421eb7Schris	# . /.instutils
66a6421eb7Schris	grep() sed -n "/$1/p"
67a6421eb7Schris
68a6421eb7Schris	# run the installation or upgrade script.
69a6421eb7Schris	if [ -x /sysinst ]; then
70a6421eb7Schris		# run the installation or upgrade script.
71*42d0f98bSmartin		sysinst || stty sane
72a6421eb7Schris	else
73a6421eb7Schris		echo "This image contains utilities which may be needed"
74a6421eb7Schris		echo "to get you out of a pinch."
75a6421eb7Schris	fi
76a6421eb7Schrisfi
77